public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfq: Optimization for close cooperating queue searching
@ 2009-12-08  7:43 Gui Jianfeng
  2009-12-08  7:54 ` Jens Axboe
  2009-12-08 14:42 ` Vivek Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Gui Jianfeng @ 2009-12-08  7:43 UTC (permalink / raw)
  To: Vivek Goyal, Jens Axboe; +Cc: linux-kernel

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cfq: Optimization for close cooperating queue searching
  2009-12-08  7:43 [PATCH] cfq: Optimization for close cooperating queue searching Gui Jianfeng
@ 2009-12-08  7:54 ` Jens Axboe
  2009-12-08 14:42 ` Vivek Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2009-12-08  7:54 UTC (permalink / raw)
  To: Gui Jianfeng; +Cc: Vivek Goyal, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cfq: Optimization for close cooperating queue searching
  2009-12-08  7:43 [PATCH] cfq: Optimization for close cooperating queue searching Gui Jianfeng
  2009-12-08  7:54 ` Jens Axboe
@ 2009-12-08 14:42 ` Vivek Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Vivek Goyal @ 2009-12-08 14:42 UTC (permalink / raw)
  To: Gui Jianfeng; +Cc: Jens Axboe, linux-kernel

On Tue, Dec 08, 2009 at 03:43:41PM +0800, 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>

Thanks Gui. Looks good.

Vivek

> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-08 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08  7:43 [PATCH] cfq: Optimization for close cooperating queue searching Gui Jianfeng
2009-12-08  7:54 ` Jens Axboe
2009-12-08 14:42 ` Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox