Subject: Re: Is O_DIRECT useless on NetBSD?
To: None <>
From: Pavel Cahyna <>
List: tech-kern
Date: 11/22/2007 21:01:15
On Wed, Nov 21, 2007 at 05:17:48PM +0200, Antti Kantee wrote:
> On Wed Nov 21 2007 at 16:08:59 +0100, Roland Illig wrote:
> > So am I right that currently there is no way for a program to say "I 
> > will write some data to that file, and nobody is going to use it in the 
> > next time, so please don't buffer it"?
> > 
> > I'm asking because it is pretty annoying that the cached data for 
> > programs I often run (like firefox, eclipse) is displaced by data that 
> > will not be used. That makes starting these programs very slow.
> I'm not sure.  You could try mmap + madvise, e.g. madvise MADV_FREE
> after processing if you're *sure* you won't never ever access the data in
> another program. 

Or posix_fadvise?