From patchwork Fri Aug 28 01:12:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Jianfeng X-Patchwork-Id: 44369 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 n7S1G2Vq003570 for ; Fri, 28 Aug 2009 01:16:02 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 92A4061A73B; Thu, 27 Aug 2009 21:16:01 -0400 (EDT) Received: from int-mx05.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n7S1FvQW029204 for ; Thu, 27 Aug 2009 21:15:57 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7S1FtoD002751; Thu, 27 Aug 2009 21:15:56 -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 n7S1Fjsl017477; Thu, 27 Aug 2009 21:15:45 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id E3C8B170028; Fri, 28 Aug 2009 09:15:44 +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 n7S1G9s9002230; Fri, 28 Aug 2009 09:16:10 +0800 Received: from [127.0.0.1] (unknown [10.167.141.226]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 83512D415F; Fri, 28 Aug 2009 09:19:22 +0800 (CST) Message-ID: <4A972F19.4090408@cn.fujitsu.com> Date: Fri, 28 Aug 2009 09:12:57 +0800 From: Gui Jianfeng User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Vivek Goyal References: <1250451046-9966-1-git-send-email-vgoyal@redhat.com> <1250451046-9966-12-git-send-email-vgoyal@redhat.com> In-Reply-To: <1250451046-9966-12-git-send-email-vgoyal@redhat.com> X-TM-AS-Product-Ver: : ISVW-6.0.0.2339-3.52.0.1010-13974000 X-TM-AS-Result: : No X-TM-AS-Category-Info: : 31:0.000000 X-TM-AS-MatchedID: : 1-150567-188019-139010 X-RedHat-Spam-Score: -1.95 (AWL,RDNS_NONE) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.11 X-loop: dm-devel@redhat.com Cc: dhaval@linux.vnet.ibm.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, jmarchan@redhat.com, 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, s-uchida@ap.jp.nec.com, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, righi.andrea@gmail.com Subject: [dm-devel] Re: [PATCH 11/24] io-controller: Introduce group idling 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: ... > @@ -2201,13 +2362,44 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq) > * mean seek distance, give them a chance to run instead > * of idling. > */ > - if (elv_ioq_slice_used(ioq) || elv_ioq_class_idle(ioq)) > + if (elv_ioq_slice_used(ioq) || elv_ioq_class_idle(ioq)) { > + /* > + * This is the last empty queue in the group and it > + * has consumed its slice. If we expire it right away > + * group might loose its share. Wait for an extra > + * group_idle period for a request before queue > + * expires. > + */ > + if (elv_iog_should_idle(ioq)) { > + elv_iog_arm_slice_timer(q, iog, 1); > + goto done; > + } > + Hi Vivek, I think we shouldn't arm idle timer on iog again, if it's already on. 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 a4161c2..04f646f 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -3116,7 +3116,8 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq) * group_idle period for a request before queue * expires. */ - if (elv_iog_should_idle(ioq)) { + if (elv_iog_should_idle(ioq) && + !elv_iog_wait_busy(iog)) { elv_iog_arm_slice_timer(q, iog, 1); goto done; }