On Mon, May 24, 2010 at 02:34:28PM -0500, Roman Kononov wrote:
> On Sun, 23 May 2010 23:12:24 -0500 Stan Hoeppner
> <stan@xxxxxxxxxxxxxxxxx> wrote:
> > "The whole notion of "direct IO" is totally braindamaged. Just say no.
> > From: http://lkml.org/lkml/2007/1/10/235
> I definitely measure dramatic overall performance benefit using
> O_DIRECT carefully.
> In that thread, it is doubtful that madvise+mmap+msync allow
> asynchronous zero-copy reads and writes to/from already pinned by a
> device driver memory of data produced/consumed by that device, without
> cache pollution and with intelligent handling of disk errors. Am I
No, you are not wrong.
Remember, just because Linus asserts something it doesn't mean he is
right. Yes, he's right an awful lot of the time, but not always. In
this case, most people with experience in writing high performance
IO engines with tell your that mmap() and advisory interfaces are no
substitute for the fine grained control of IO issue that direct IO
provides you with.
And in the case of XFS, mmap serialiseѕ write page faults to
different areas of the same file, whereas direct IO allows
concurrent reads and writes to different regions of the same file.
That makes direct IO far more scalable than than any mmap interface
will ever be....