Message195948
> I propose to add an optional keyword parameter with default value "SYNC" (compatibility) but that can be "ASYNC", "INVALIDATE" (can be "SYNC|INVALIDATE" and "ASYNC|INVALIDATE" too).
AFAICT it's mostly useless on a modern OS.
MS_INVALIDATE is a no-op on systems with merged VM-buffer cache, i.e.
it's not needed for mmap() to reflect write() and vice-versa.
So nothing's normally needed to "synchronize file and memory".
As for MS_ASYNC, it actually doesn't do anything at all on recent OS,
e.g. it's a no-op on Linux since a couple years, since modified pages
will be written back as part of the normal writeback process.
The only thing a user might actually need for an mmap object is to
make sure data is actually committed to disk, and MS_SYNC covers this.
See e.g. this post by Andrew Morton:
http://thread.gmane.org/gmane.linux.kernel/1312660 |
|
Date |
User |
Action |
Args |
2013-08-23 07:48:45 | neologix | set | recipients:
+ neologix, jcea |
2013-08-23 07:48:45 | neologix | set | messageid: <1377244125.43.0.955442612148.issue18816@psf.upfronthosting.co.za> |
2013-08-23 07:48:45 | neologix | link | issue18816 messages |
2013-08-23 07:48:45 | neologix | create | |
|