mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: miklos@szeredi.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix readahead breakage for sequential after random reads
Date: 26 Jul 2004 21:18:47 -0700	[thread overview]
Message-ID: <1090901926.8416.13.camel@dyn319181.beaverton.ibm.com> (raw)
In-Reply-To: <20040726170843.3fe5615c.akpm@osdl.org>

On Mon, 2004-07-26 at 17:08, Andrew Morton wrote:
> Ram Pai <linuxram@us.ibm.com> wrote:
> >
> > Andrew,
> > 	Yes the patch fixes a valid bug.
> > 
> 
> Please don't top-post :(
> > RP
> > 
> > On Mon, 2004-07-26 at 16:29, Andrew Morton wrote:
> > > Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > >
> > > > Current readahead logic is broken when a random read pattern is
> > > >  followed by a long sequential read.  The cause is that on a window
> > > >  miss ra->next_size is set to ra->average, but ra->average is only
> > > >  updated at the end of a sequence, so window size will remain 1 until
> > > >  the end of the sequential read.
> > > > 
> > > >  This patch fixes this by taking the current sequence length into
> > > >  account (code taken from towards end of page_cache_readahead()), and
> > > >  also setting ra->average to a decent value in handle_ra_miss() when
> > > >  sequential access is detected.
> > > 
> > > Thanks.   Do you have any performance testing results from this patch?
> > > 
> > Ram Pai <linuxram@us.ibm.com> wrote:
> >
> > Andrew,
> > 	Yes the patch fixes a valid bug.
> 
> Fine, but the readahead code is performance-sensitive, and it takes quite
> some time for any regressions to be discovered.  So I'm going to need to
> either sit on this patch for a very long time, or extensively test it
> myself, or await convincing test results from someone else.
> 
> Can you help with that?

yes I will run all my standard testsuites before we take this patch.
(DSS workload, iozone, sysbench). I will get back with some results
sooon. Probably by the end of this week.

Also I think the bug that Miklos, found is really hard to reproduce. Did
he find this bug by code inspection? Its really really hard to get into
a state where the current window is of size 1 page with zero pages in
the readahead window, and then the sequential read pattern to just right
then. 

RP

> 


  reply	other threads:[~2004-07-27  4:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-18 22:30 Miklos Szeredi
2004-07-26 23:29 ` Andrew Morton
2004-07-26 23:56   ` Ram Pai
2004-07-27  0:08     ` Andrew Morton
2004-07-27  4:18       ` Ram Pai [this message]
2004-07-27  7:40         ` Miklos Szeredi
2004-07-27 15:34           ` Ram Pai
2004-08-04 17:38         ` Ram Pai
2004-08-04 19:39           ` Shane Shrybman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1090901926.8416.13.camel@dyn319181.beaverton.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®