Re: fadvise syscall?

Joel Becker
2002-03-17T19:20:47Z

On Sun, Mar 17, 2002 at 01:41:37PM +0000, Anton Altaparmakov wrote:
> When you want large data streaming, i.e. you start getting worried about
> memory pressure, then you want open(2) + O_DIRECT. No caching done. Perfect
> for large data streams and we have that already. I agree that you may want
> some form of asynchronous read ahead with passed pages being dropped from
> the cache but that could be just a open(2) + O_SEQUENTIAL (doesn't exist yet).

O_DIRECT isn't the right thing for large streaming. You want
readahead and dropbehind. O_DIRECT takes substantial penalties for its
lack of copy/cacheing. This works fine in certain circumstances
(applications that keep their own caching), but for something like a
video or mp3, you'll win with working dropbehind easily.

Joel

--

Life's Little Instruction Book #444

"Never underestimate the power of a kind word or deed."

http://www.jlbec.org/
jlbec@evilplan.org