Re: Streaming disk I/O kills file buffering and makes Linux unusable

Florian Weimer (fw@s.netic.de)
23 Aug 1999 22:23:25 +0200


Peter Monta <pmonta@halibut.imedia.com> writes:

> > Will future kernels ave an O_DIRECT like flag to avoid caching ?
>
> Stephen Tweedie has written a patch for unbuffered I/O;

I don't think unbuffered I/O is the solution in this case, because
you don't want to miss read ahead. IMHO, something like O_NOCACHE
(or O_DISCARDCACHE) would be better, and looking at the 2.2.11 page
cache code, this should be that hard to implement: simply don't set the
PG_referenced bit on page access (or when the page is inserted into the
page cache). This should cause shrink_mmap() to favor these pages when
looking for candidates to free.

(I hope I read the code correctly. It's almost the first time I had
a look at it...)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/