All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Cc: Jens Axboe <axboe@kernel.dk>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cfq-iosched: Fix update_vdisktime logic
Date: Tue, 25 Jan 2011 16:26:56 -0500	[thread overview]
Message-ID: <20110125212656.GF10664@redhat.com> (raw)
In-Reply-To: <4D3E4317.80406@cn.fujitsu.com>

On Tue, Jan 25, 2011 at 11:27:19AM +0800, Gui Jianfeng wrote:
> The update_vdisktime logic is broken since commit b54ce60eb7f61f8e314b8b241b0469eda3bb1d42,
> st->min_vdisktime never makes a progress. Fix it.
> 
> Thanks Vivek for pointing it out.
> 
> Signed-off-by: Gui Jianfeng <guijianfen@cn.fujitsu.com>

Thanks Gui. Looks good to me.

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Thanks
Vivek

> ---
>  block/cfq-iosched.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index f083bda..8c28f56 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -558,15 +558,13 @@ static inline u64 min_vdisktime(u64 min_vdisktime, u64 vdisktime)
>  
>  static void update_min_vdisktime(struct cfq_rb_root *st)
>  {
> -	u64 vdisktime = st->min_vdisktime;
>  	struct cfq_group *cfqg;
>  
>  	if (st->left) {
>  		cfqg = rb_entry_cfqg(st->left);
> -		vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime);
> +		st->min_vdisktime = max_vdisktime(st->min_vdisktime,
> +						  cfqg->vdisktime);
>  	}
> -
> -	st->min_vdisktime = max_vdisktime(st->min_vdisktime, vdisktime);
>  }
>  
>  /*
> -- 
> 1.7.1

  reply	other threads:[~2011-01-25 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  3:27 [PATCH] cfq-iosched: Fix update_vdisktime logic Gui Jianfeng
2011-01-25 21:26 ` Vivek Goyal [this message]
2011-03-07  1:35   ` Gui Jianfeng
2011-03-07  8:28     ` Jens Axboe

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=20110125212656.GF10664@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.