1 Apr 2004 01:20
Re: msync() behaviour broken for MS_ASYNC, revert patch?
Stephen C. Tweedie <sct <at> redhat.com>
2004-03-31 23:20:21 GMT
2004-03-31 23:20:21 GMT
Hi, On Wed, 2004-03-31 at 23:53, Andrew Morton wrote: > "Stephen C. Tweedie" <sct <at> redhat.com> wrote: > > Unfortunately, this seems to contradict SingleUnix requirements, which > > state: > > When MS_ASYNC is specified, msync() shall return immediately > > once all the write operations are initiated or queued for > > servicing > > although I can't find an unambiguous definition of "queued for service" > > in the online standard. I'm reading it as requiring that the I/O has > > reached the block device layer > I don't think I agree with that. If "queued for service" means we've > started the I/O, then what does "initiated" mean, and why did they specify > "initiated" separately? I'd interpret "initiated" as having reached hardware. "Queued for service" is much more open to interpretation: Uli came up with "the data must be actively put in a stage where I/O is initiated", which still doesn't really address what sort of queueing is allowed. > What triggered all this was a dinky little test app which Linus wrote to > time some aspect of P4 tlb writeback latency. It sits in a loop dirtying a > page then msyncing it with MS_ASYNC. It ran very poorly, because MS_ASYNC > ended up waiting on the previously-submitted I/O before starting new I/O. Sure. There are lots of ways an interface can be misused, though: you only know if one use is valid or not once you've determined what the(Continue reading)
RSS Feed