From patchwork Tue Jun 30 07:49:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Jianfeng X-Patchwork-Id: 33069 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 n5U7o8J6028749 for ; Tue, 30 Jun 2009 07:50:08 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 272D061866E; Tue, 30 Jun 2009 03:50:08 -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 n5U7o3lu030352 for ; Tue, 30 Jun 2009 03:50:03 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5U7o11b001896; Tue, 30 Jun 2009 03:50:01 -0400 Received: from song.cn.fujitsu.com (cn.fujitsu.com [222.73.24.84] (may be forged)) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n5U7nlCe025658; Tue, 30 Jun 2009 03:49:48 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id B17D017012D; Tue, 30 Jun 2009 15:55:02 +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 n5U8Eqsc013905; Tue, 30 Jun 2009 16:14:52 +0800 Received: from [127.0.0.1] (unknown [10.167.141.226]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 0FF50D4016; Tue, 30 Jun 2009 15:52:06 +0800 (CST) Message-ID: <4A49C381.3040302@cn.fujitsu.com> Date: Tue, 30 Jun 2009 15:49:21 +0800 From: Gui Jianfeng User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Vivek Goyal References: <1245443858-8487-1-git-send-email-vgoyal@redhat.com> <1245443858-8487-9-git-send-email-vgoyal@redhat.com> In-Reply-To: <1245443858-8487-9-git-send-email-vgoyal@redhat.com> X-RedHat-Spam-Score: -0.89 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 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] [PATCH] io-controller: Don't expire an idle ioq if it's the only ioq in hierarchy 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 Hi Vivek, We don't expect expiring an idle ioq if it's the only ioq in the hierarchy. Signed-off-by: Gui Jianfeng --- block/elevator-fq.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/elevator-fq.c b/block/elevator-fq.c index 4270cfd..0b65e16 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -4058,12 +4058,6 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq) elv_clear_ioq_slice_new(ioq); } - if (elv_ioq_class_idle(ioq)) { - if (elv_iosched_expire_ioq(q, 1, 0)) - elv_ioq_slice_expired(q); - goto done; - } - /* * If there is only root group present, don't expire the queue * for single queue ioschedulers (noop, deadline, AS). It is @@ -4077,6 +4071,12 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq) goto done; } + if (elv_ioq_class_idle(ioq)) { + if (elv_iosched_expire_ioq(q, 1, 0)) + elv_ioq_slice_expired(q); + goto done; + } + /* For async queue try to do wait busy */ if (efqd->fairness && !elv_ioq_sync(ioq) && !ioq->nr_queued && (elv_iog_nr_active(iog) <= 1)) {