Subject: Re: yamt-readahead branch
To: YAMAMOTO Takashi <>
From: Chuck Silvers <>
List: tech-kern
Date: 11/17/2005 10:06:46
On Thu, Nov 17, 2005 at 06:18:26PM +0900, YAMAMOTO Takashi wrote:
> > > 	- building a heuristic which can handle multiple stream is hard. :-)
> > 
> > I agree it's not trivial, but that should make it all the more satisfying.  :-)
> ok. :-)
> then,
> 	- store a hint from posix_fadvise in struct file.
> 	- pass the hint to VOP_READ, instead of uvm_ractx.

let's take a few bits from fp->f_flag and the ioflg argument to
VOP_READ() for these.

some of the hints seem to want more of an immediate effect than
a future effect, so we probably don't need to store all of them.
the corresponding code for madvise() only stores NORMAL, RANDOM and
SEQUENTIAL, so I think we only need two bits.

there's one extra type of advice for fadvise that madvise doesn't have
(NOREUSE), and that looks more like direct I/O to me, so we could just
implement it that way.  or we could encode it in the two bits of flags
as well.

> 	- uvm_ra_request can do whatever it want with the hint.
> sounds good?