public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Cc: Vivek Goyal <vgoyal@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cfq: Optimization for close cooperating queue searching
Date: Tue, 8 Dec 2009 08:54:50 +0100	[thread overview]
Message-ID: <20091208075449.GK8742@kernel.dk> (raw)
In-Reply-To: <4B1E03AD.7060606@cn.fujitsu.com>

On Tue, Dec 08 2009, Gui Jianfeng wrote:
> It doesn't make any sense to try to find out a close cooperating 
> queue if current cfqq is the only one in the group.
> 
> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
>  block/cfq-iosched.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index cfb0b2f..89b5dd9 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -1750,6 +1750,12 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd,
>  		return NULL;
>  
>  	/*
> +	 * Don't search priority tree if it's the only queue in the group.
> +	 */
> +	if (cur_cfqq->cfqg->nr_cfqq == 1)
> +		return NULL;
> +
> +	/*
>  	 * We should notice if some of the queues are cooperating, eg
>  	 * working closely on the same area of the disk. In that case,
>  	 * we can group them together and don't waste time idling.
> -- 
> 1.5.4.rc3

Good point, thanks applied.

-- 
Jens Axboe


  reply	other threads:[~2009-12-08  7:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08  7:43 [PATCH] cfq: Optimization for close cooperating queue searching Gui Jianfeng
2009-12-08  7:54 ` Jens Axboe [this message]
2009-12-08 14:42 ` Vivek Goyal

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=20091208075449.GK8742@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@redhat.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