From patchwork Wed Jun 10 07:44:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Jianfeng X-Patchwork-Id: 29209 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 n5A7ldV0000855 for ; Wed, 10 Jun 2009 07:47:39 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 ECE446197C1; Wed, 10 Jun 2009 03:47:38 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n5A7lacX021908 for ; Wed, 10 Jun 2009 03:47:36 -0400 Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5A7lZiJ022702; Wed, 10 Jun 2009 03:47:35 -0400 Received: from song.cn.fujitsu.com (cn.fujitsu.com [222.73.24.84] (may be forged)) by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id n5A7lRc2016507; Wed, 10 Jun 2009 03:47:27 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 3496E170091; Wed, 10 Jun 2009 16:09:05 +0800 (CST) Received: from fnst.cn.fujitsu.com (localhost.localdomain [127.0.0.1]) by tang.cn.fujitsu.com (8.13.1/8.13.1) with ESMTP id n5A7xSNU017831; Wed, 10 Jun 2009 15:59:28 +0800 Received: from [127.0.0.1] (unknown [10.167.141.226]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 5024BD402F; Wed, 10 Jun 2009 15:46:17 +0800 (CST) Message-ID: <4A2F646A.8070403@cn.fujitsu.com> Date: Wed, 10 Jun 2009 15:44:42 +0800 From: Gui Jianfeng User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Vivek Goyal References: <1244513342-11758-1-git-send-email-vgoyal@redhat.com> <1244513342-11758-18-git-send-email-vgoyal@redhat.com> In-Reply-To: <1244513342-11758-18-git-send-email-vgoyal@redhat.com> X-RedHat-Spam-Score: -0.728 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.32 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, m-ikeda@ds.jp.nec.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, righi.andrea@gmail.com, containers@lists.linux-foundation.org Subject: [dm-devel] Re: [PATCH 17/19] io-controller: Support per cgroup per device weights and io class 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 Vivek Goyal wrote: ... > > @@ -1233,6 +1254,8 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key, > elv_get_iog(iog); > > iog->iocg_id = css_id(&iocg->css); > + io_group_init_entity(iocg, iog, iog->dev); Hi Vivek, A regression occurs in io.policy handling. IO Controller completely stops working when i use this interface. Make sure that we initialize entity after iog->dev is setting up properly. Signed-off-by: Gui Jianfeng --- 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 6b30c36..a516dce 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -1451,7 +1451,6 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key, elv_get_iog(iog); iog->iocg_id = css_id(&iocg->css); - io_group_init_entity(iocg, iog, iog->dev); iog->my_entity = &iog->entity; if (bio) { @@ -1459,6 +1458,8 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key, iog->dev = MKDEV(disk->major, disk->first_minor); } + io_group_init_entity(iocg, iog, iog->dev); + blk_init_request_list(&iog->rl); #ifdef CONFIG_DEBUG_GROUP_IOSCHED io_group_path(iog, iog->path, sizeof(iog->path));