Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754671AbZLHHyq (ORCPT ); Tue, 8 Dec 2009 02:54:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753194AbZLHHyo (ORCPT ); Tue, 8 Dec 2009 02:54:44 -0500 Received: from 0122700014.0.fullrate.dk ([95.166.99.235]:57384 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752044AbZLHHyo (ORCPT ); Tue, 8 Dec 2009 02:54:44 -0500 Date: Tue, 8 Dec 2009 08:54:50 +0100 From: Jens Axboe To: Gui Jianfeng Cc: Vivek Goyal , linux-kernel@vger.kernel.org Subject: Re: [PATCH] cfq: Optimization for close cooperating queue searching Message-ID: <20091208075449.GK8742@kernel.dk> References: <4B1E03AD.7060606@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B1E03AD.7060606@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1242 Lines: 39 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 > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/