public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@gmail.com>
To: Ram Pai <linuxram@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	John Tran <jbtran@ca.ibm.com>, Mike Sullivan <mksully@us.ibm.com>,
	Chris Mason <mason@suse.com>,
	Steven Pratt <slpratt@austin.ibm.com>,
	Badari Pulavarty <badari@us.ibm.com>,
	Mingming Cao <mcao@us.ibm.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] readahead: partial sendfile fix
Date: Thu, 8 Mar 2007 18:25:50 +0800	[thread overview]
Message-ID: <373349571.06906@ustc.edu.cn> (raw)
Message-ID: <20070308102549.GA5908@mail.ustc.edu.cn> (raw)
In-Reply-To: <1171309751.2891.70.camel@ram.us.ibm.com>

Ram Pai,

Sorry for the long delay, I was just back from the winter vacation.

On Mon, Feb 12, 2007 at 11:49:10AM -0800, Ram Pai wrote:
> The solution you proposed seems kludgy to me. If you determine that the

I dislike it, either.

> its a restarted aio, then start reading from where readahead had left
> reading from earlier. To me a simple fix is:
> 
> -       if (unlikely(aio_restarted()))
> -               next_index = last_index; /* Avoid repeat readahead */
> 
> +       if (unlikely(aio_restarted()))
> +  		next_index = min(prev_index+1, last_index);
> 
> 
> No? 

Can be even simpler, if we _only_ want to fix the aio case:

+       if (unlikely(aio_restarted()))
+               next_index = prev_index + 1;

Regards,
Wu

      reply	other threads:[~2007-03-08 10:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070210014049.GA11269@mail.ustc.edu.cn>
2007-02-10  1:40 ` [PATCH -mm] readahead: partial sendfile fix Fengguang Wu
2007-02-12 19:49 ` Ram Pai
     [not found]   ` <20070308102549.GA5908@mail.ustc.edu.cn>
2007-03-08 10:25     ` Fengguang Wu [this message]

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=373349571.06906@ustc.edu.cn \
    --to=fengguang.wu@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=badari@us.ibm.com \
    --cc=jbtran@ca.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=mason@suse.com \
    --cc=mcao@us.ibm.com \
    --cc=mksully@us.ibm.com \
    --cc=slpratt@austin.ibm.com \
    --cc=suparna@in.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox