[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1HWGtr-0004ZN-00@dorka.pomaz.szeredi.hu>
Date: Tue, 27 Mar 2007 21:00:07 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: linux@...izon.com
CC: akpm@...ux-foundation.org, linux@...izon.com,
linux-kernel@...r.kernel.org, linux-mm@...r.kernel.org
Subject: Re: [patch resend v4] update ctime and mtime for mmaped write
> > I agree that msync(MS_ASYNC) has no semantics if time is ignored.
> > But it's a useful way to tell the OS that the page is not going
> > to be dirtied again.
>
> Just to clarify, here's the header comment for sys_msync():
>
> /*
> * MS_SYNC syncs the entire file - including mappings.
> *
> * MS_ASYNC does not start I/O (it used to, up to 2.5.67).
> * Nor does it marks the relevant pages dirty (it used to up to 2.6.17).
> * Now it doesn't do anything, since dirty pages are properly tracked.
> *
> * The application may now run fsync() to
> * write out the dirty pages and wait on the writeout and check the result.
> * Or the application may run fadvise(FADV_DONTNEED) against the fd to start
> * async writeout immediately.
> * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to
> * applications.
> */
>
> It's actually wrong about FADV_DONTNEED, which I think doesn't start
> writeout either. So there you have it ;)
Sorry, FADV_DONTNEED _does_ seem to start writeout, but it does it
indiscriminately, not just on the specified range. That should be
easy to fix though.
Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists