Re: [RFC][PATCH] on-demand readahead

2007-04-26 Thread Andrew Morton
On Thu, 26 Apr 2007 00:04:00 +0800 Fengguang Wu <[EMAIL PROTECTED]> wrote: > If this new algorithm has been further tested and approved, I'll > re-submit the patch in a cleaner, standalone form. The adaptive > readahead patches can be dropped then. They may better be reworked as > a kernel module.

Re: [RFC][PATCH] on-demand readahead

2007-04-25 Thread Fengguang Wu
On Wed, Apr 25, 2007 at 06:08:44PM +0200, Andi Kleen wrote: > > Yeah, the on-demand readahead can avoid _all_ lookups for small in-cache > > files. > > How? In filemap.c: if (!page) { page_cache_readahead_adaptive(mapping,

Re: [RFC][PATCH] on-demand readahead

2007-04-25 Thread Andi Kleen
> Yeah, the on-demand readahead can avoid _all_ lookups for small in-cache > files. How? > But what do you mean by AS? struct address_space > > You seem to have a lot of magic numbers. They probably all need symbols and > > explanations. > > The magic numbers are for easier testings, and wil

Re: [RFC][PATCH] on-demand readahead

2007-04-25 Thread Fengguang Wu
On Wed, Apr 25, 2007 at 04:37:41PM +0200, Andi Kleen wrote: > Fengguang Wu <[EMAIL PROTECTED]> writes: > > > OVERHEADS > > > > The new code reduced the overheads of > > > > - excessively calling the readahead routine on small sized reads > > (the current readahead code insists on seein

Re: [RFC][PATCH] on-demand readahead

2007-04-25 Thread Andi Kleen
Fengguang Wu <[EMAIL PROTECTED]> writes: > OVERHEADS > > The new code reduced the overheads of > > - excessively calling the readahead routine on small sized reads > (the current readahead code insists on seeing all requests) > > - doing a lot of pointless page-cache lookups