From patchwork Tue Aug 4 02:02:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "IKEDA, Munehiro" X-Patchwork-Id: 39043 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7424FYh016007 for ; Tue, 4 Aug 2009 02:04:15 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 6DD2F619DF3; Mon, 3 Aug 2009 22:04:14 -0400 (EDT) Received: from int-mx2.corp.redhat.com ([172.16.27.26]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n7424Cdo031481 for ; Mon, 3 Aug 2009 22:04:12 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7424Bc9011629; Mon, 3 Aug 2009 22:04:11 -0400 Received: from ronnie.usersys.redhat.com (dhcp-100-2-140.bos.redhat.com [10.16.2.140]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n74249b5020793; Mon, 3 Aug 2009 22:04:09 -0400 Message-ID: <4A7796D2.4030104@ds.jp.nec.com> Date: Mon, 03 Aug 2009 22:02:58 -0400 From: Munehiro Ikeda User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Gui Jianfeng References: <1246564917-19603-1-git-send-email-vgoyal@redhat.com> <4A569FC5.7090801@cn.fujitsu.com> In-Reply-To: <4A569FC5.7090801@cn.fujitsu.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-loop: dm-devel@redhat.com Cc: dhaval@linux.vnet.ibm.com, snitzer@redhat.com, peterz@infradead.org, dm-devel@redhat.com, dpshah@google.com, jens.axboe@oracle.com, agk@redhat.com, balbir@linux.vnet.ibm.com, paolo.valente@unimore.it, fernando@oss.ntt.co.jp, mikew@google.com, jmoyer@redhat.com, nauman@google.com, Vivek Goyal , righi.andrea@gmail.com, lizf@cn.fujitsu.com, fchecconi@gmail.com, akpm@linux-foundation.org, jbaron@redhat.com, linux-kernel@vger.kernel.org, s-uchida@ap.jp.nec.com, containers@lists.linux-foundation.org Subject: [dm-devel] Re: [PATCH] io-controller: implement per group request allocation limitation X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Gui Jianfeng wrote, on 07/09/2009 09:56 PM: > Hi Vivek, > > This patch exports a cgroup based per group request limits interface. > and removes the global one. Now we can use this interface to perform > different request allocation limitation for different groups. > > Signed-off-by: Gui Jianfeng > --- (snip) Hi Jianfeng, If this helps. If calling elv_io_group_congestion_threshold() before setting iog->iocg_id, iocg->nr_group_requests cannot be referred. As a result of it, iog->nr_congestion_on is always misculculated as 0. This patch moves the calling of elv_io_group_congestion_threshold() after setting iog->iocg_id. Signed-off-by: Munehiro "Muuhh" Ikeda --- block/elevator-fq.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block/elevator-fq.c b/block/elevator-fq.c index 7c83d1e..3368a7f 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -2195,7 +2195,6 @@ static struct io_group *io_alloc_root_group(struct request_queue *q, iog->sched_data.service_tree[i] = IO_SERVICE_TREE_INIT; blk_init_request_list(&iog->rl); - elv_io_group_congestion_threshold(q, iog); iocg = &io_root_cgroup; spin_lock_irq(&iocg->lock); @@ -2204,6 +2203,8 @@ static struct io_group *io_alloc_root_group(struct request_queue *q, iog->iocg_id = css_id(&iocg->css); spin_unlock_irq(&iocg->lock); + elv_io_group_congestion_threshold(q, iog); + #ifdef CONFIG_DEBUG_GROUP_IOSCHED io_group_path(iog, iog->path, sizeof(iog->path)); #endif