From patchwork Thu Aug 20 01:46:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Jianfeng X-Patchwork-Id: 42813 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 n7K1lNan011324 for ; Thu, 20 Aug 2009 01:47:24 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 3BCE061A307; Wed, 19 Aug 2009 21:47:23 -0400 (EDT) Received: from int-mx08.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 n7K1lHdF023869 for ; Wed, 19 Aug 2009 21:47:17 -0400 Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.9]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7K1lEH7015228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Aug 2009 21:47:14 -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 n7K1l3kc023343; Wed, 19 Aug 2009 21:47:04 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id BF898170044; Thu, 20 Aug 2009 09:46:56 +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 n7K1sIe8030072; Thu, 20 Aug 2009 09:54:18 +0800 Received: from [127.0.0.1] (unknown [10.167.141.226]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 934A2293F08; Thu, 20 Aug 2009 09:51:06 +0800 (CST) Message-ID: <4A8CAAE2.1030804@cn.fujitsu.com> Date: Thu, 20 Aug 2009 09:46:10 +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-RedHat-Spam-Score: 0.1 (RDNS_NONE) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.9 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] [PATCH] IO-Controller: clear ioq wait flag if a request goes into that ioq 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: ... > /* > * Remember that we saw a request from this process, but > @@ -1940,7 +2013,7 @@ void elv_ioq_request_add(struct request_queue *q, struct request *rq) > * has other work pending, don't risk delaying until the > * idle timer unplug to continue working. > */ > - if (elv_ioq_wait_request(ioq)) { > + if (group_wait || elv_ioq_wait_request(ioq)) { Hi Vivek, I guess we need to clear ioq_wait_request flags if there are requests to go in this ioq. Otherwise, once waitting request on ioq, it will go into this path every time when a request is enqueued. Signed-off-by: Gui Jianfeng --- block/elevator-fq.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block/elevator-fq.c b/block/elevator-fq.c index b3c387d..201543e 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -2708,6 +2708,9 @@ void elv_ioq_request_add(struct request_queue *q, struct request *rq) __blk_run_queue(q); else elv_mark_ioq_must_dispatch(ioq); + + if (elv_ioq_wait_request(ioq)) + elv_clear_ioq_wait_request(ioq); } } else if (elv_should_preempt(q, ioq, rq)) { /*