Re: fcntl() or ioctl() for fs readahead?

Larry McVoy (lm@neteng.engr.sgi.com)
11 May 1996 04:52:05 GMT


Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de) wrote:
: If you do a random seek benchmark, readahead might (depending on the
: buffer size and the file's size) make performance worse, but for
: sequential access, it would give good performance.

Linus and I talked about this - we were thinking about adding a

reada(fd, offset, len)

interface which says fetch len bytes into the buffer cache at the offset
on that fd.

We were also thinking about adding a hack to select such that you could do

reada(fd, offset, len);

/* other work */

select(...fd..., ...)

to block until the reada has completed. Why bother when you could just block
in the read? Because you might do several reada()'s on several different
fd's.

One limitation of this approach is that the select can only inform you
about one of potentially many reada() requests. We didn't know what to do
about that.

Thoughts? This is useful to some, kernel bloat to others. I'd like to
hear if people think it is useful (I know people that do but they don't
run Linux - yet).

--
---
Larry McVoy     lm@sgi.com     http://reality.sgi.com/lm     (415) 933-1804
Copyright 1996, all rights reserved.   Microsoft Network is prohibited from
redistributing this work in any form, in whole or in part without license.
License to distribute this work is available to Microsoft at $500.
Transmission without permission constitutes an agreement to these terms.