All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Ram <linuxram@us.ibm.com>
Cc: linux-kernel@vger.kernel.org,
	Steven Pratt <slpratt@austin.ibm.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 3/4] readahead: factor out duplicated code
Date: Thu, 03 Feb 2005 14:34:01 +0300	[thread overview]
Message-ID: <42020C29.99CF1D87@tv-sign.ru> (raw)
In-Reply-To: 1107398594.5992.134.camel@localhost

Ram wrote:
> > unsigned long page_cache_readahead(mapping, ra, filp, offset, req_size)
> > {
> > 	unsigned long max, newsize = req_size;
> > 	int sequential = (offset == ra->prev_page + 1);
> >
> > 	if (offset == ra->prev_page && req_size == 1 && ra->size != 0)
> > 		goto out;
> > 	ra->prev_page = offset;		<============== PLEASE LOOK HERE :)
> > 	max = get_max_readahead(ra);
> > 	newsize = min(req_size, max);
> >
> > 	if (newsize == 0 || (ra->flags & RA_FLAG_INCACHE)) {
> > 		newsize = 1;
>
> At this point prev_page has to be updated:
>               ra->prev_page = offset;

Yes, it is already updated, before "max = get_max_readahead(ra);"

> Otherwise this code looks much cleaner and correct. Can you send me a
> updated patch. I will run it through my test harness.

Well, currently I do not know, what should be changed :)

Oleg.

  reply	other threads:[~2005-02-03 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-29 11:11 [PATCH 3/4] readahead: factor out duplicated code Oleg Nesterov
2005-01-29 11:35 ` Oleg Nesterov
2005-02-03  2:43   ` Ram
2005-02-03 11:34     ` Oleg Nesterov [this message]
2005-02-02 21:37 ` Steven Pratt
2005-02-03 11:32   ` Oleg Nesterov

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=42020C29.99CF1D87@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=slpratt@austin.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.