Re: msync() behaviour broken for MS_ASYNC, revert patch?

From: Nick Piggin
Date: Fri Feb 10 2006 - 13:55:06 EST


Linus Torvalds wrote:

On Fri, 10 Feb 2006, linux@xxxxxxxxxxx wrote:

No. MS_ASYNC says "I need the data written now.".


Says you.

I say (and I have a decade of Linux historical behaviour to back it up) that is says "I'm done, start flushing this out asynchronously like all the other data I have written".

And yes, there are performance implications. But your claim that "start IO now" performs better is bogus. It _sometimes_ performs better, but sometimes performs much worse.

Take an example. You have a 200MB dirty area in a 1GB machine. You do MS_ASYNC. What do you want to happen?


It quite obviously depends on the context in which one is using it,
which will depend on what one expects it to do (unless one is an idiot).

If linux@xxxxxxxxxxx's[1] database has dirtied 200MB of data and
knows it will not dirty it again and has several hundred ms of useful
work to do before it must call MS_SYNC, then...

Do you want IO to be started on all of it?

... yes.

[1] Come on, linux, can you at least make up a name for me, or are
you really called Linux? (in which case you'd better make up a
new name anyway when arguing with Linus about Linux, for the
sake of everyone's sanity)

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
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/