Re: [PATCH 5/9] readahead: on-demand readahead logic

From: Fengguang Wu
Date: Wed Jun 13 2007 - 03:07:39 EST


On Wed, Jun 13, 2007 at 03:51:14PM +1000, Rusty Russell wrote:
> > > static unsigned long
> > > ondemand_readahead(struct address_space *mapping,
> > > struct file_ra_state *ra, struct file *filp,
> > > - struct page *page, pgoff_t offset,
> > > + bool hit_lookahead_marker, pgoff_t offset,
> >
> > Or use names like async/is_async for hit_lookahead_marker?
>
> I wasn't sure. The argument says "we've hit a marker, so do readahead
> even if doesn't look sequential.". Now, you and I know that only
> happens if it's an async readahead, but that's not really relevant to
> this function.

Yeah, it's an interface for the message "hey I hit a readahead marker".
That's the point!

> OK, here is revised patch with your changes:
>
> ====
> Split ondemand readahead interface into two functions. I think this
> makes it a little clearer for non-readahead experts (like Rusty).
>
> Internally they both call ondemand_readahead(), but the page argument
> is changed to an obvious boolean flag.
>
> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Acked-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx>

Thank you,
Fengguang

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