Re: msync() behaviour broken for MS_ASYNC, revert patch?
From: Linus Torvalds
Date: Fri Feb 10 2006 - 11:20:30 EST
On Fri, 10 Feb 2006, Nick Piggin wrote:
> It may be a very useful operation in kernel, but I think userspace either
> wants to definitely know the data is on disk (WRITE_SYNC), or give a hint
> to start writing (WRITE_ASYNC).
Only from a _stupid_ user standpoint.
The fact is, "start writing and wait for the result" is fundamentally a
totally broken operation.
Because a smart user actually would want to do
- start writing this
- start writing that
- start writing that-other-thing
- wait for them all.
The reason synchronous write performance is absolutely disgusting is
exactly that people think "start writing" should be paired up with "wait
So the kernel internally separates "start writing" and "wait for it" for
very good reasons. Reasons that in no way go away just because you use to
And yes, there very much is a third operation too: "mark dirty". That's
the _common_ one. That's the fundamental one. That's the one that we use
every single day, without even realizing. The "start writing" and "wait
for it" operations are actually the rare ones.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/