Ulrich Hobelmann <u.hobelmann@web.de> wrote:
+---------------
| mmap()ed files are also cached, no?
+---------------
Not always. See the O_SYNC to "open()" on some OSes, e.g., Linux:
O_SYNC The file is opened for synchronous I/O. Any writes on the
resulting file descriptor will block the calling process until
the data has been physically written to the underlying hardware.
See RESTRICTIONS below, though.
...
RESTRICTIONS
There are many infelicities in the protocol underlying NFS, affecting
amongst others O_SYNC and O_NDELAY.
POSIX provides for three different variants of synchronised I/O, corre-
sponding to the flags O_SYNC, O_DSYNC and O_RSYNC. Currently (2.1.130)
these are all synonymous under Linux.
+---------------
| I'd like to be able to tell the OS not to cache whatever file I'm
| reading sequentially (or just the "current" couple of 100k).
+---------------
See my previous reply re O_DIRECT.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607