Subject: Re: Is O_DIRECT useless on NetBSD?
To: Antti Kantee , Roland Illig <rillig@NetBSD.org>
From: Chuck Silvers <firstname.lastname@example.org>
Date: 12/17/2007 19:48:21
On Fri, Nov 23, 2007 at 05:51:14PM +0200, Antti Kantee wrote:
> On Thu Nov 22 2007 at 23:53:34 +0100, Roland Illig wrote:
> > Pavel Cahyna 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"?
> > >
> > >Or posix_fadvise?
> > Nice idea, but ...
> > BUGS
> > POSIX_FADV_WILLNEED, POSIX_FADV_DONTNEED, and POSIX_FADV_NOREUSE
> > are not implemented.
> This quick patch/hack will add support for POSIX_FADV_NOREUSE. But I/O
> will be quite slow if you use small sizes.
this implementation looks pretty good. but I wonder if we should try to
handle seqential-but-non-mapping-window-aligned access better, by leaving
the partially-accessed page in the cache until we're done with it? if we
don't do that, it would be better to do the invalidations on page
boundaries instead of mapping-window boundaries if that's convenient.