[Top] [All Lists]

Re: WARNING in xfs_lwr.c, xfs_write()

To: Roman Kononov <roman@xxxxxxxxxxxxxx>
Subject: Re: WARNING in xfs_lwr.c, xfs_write()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 26 May 2010 17:06:20 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100524143428.6f3a117c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20100523002023.41f5a5c8@xxxxxxxxxxxxxxxxxxxxxxx> <20100523101856.GL2150@dastard> <20100523092344.0fcaab42@xxxxxxxxxxxxxxxxxxxxxxx> <4BF9FCA8.8090906@xxxxxxxxxxxxxxxxx> <20100524143428.6f3a117c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
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
> wrong?

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....


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>