Subject: Re: Is Greenspun enough?
From: (Rob Warnock)
Date: Fri, 09 Dec 2005 23:01:37 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Ulrich Hobelmann  <> 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.
     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 Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607