From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [PATCH] IO-Controller: clear ioq wait flag if a request goes into that ioq Date: Thu, 20 Aug 2009 09:42:21 -0400 Message-ID: <20090820134221.GC10615@redhat.com> References: <1250451046-9966-1-git-send-email-vgoyal@redhat.com> <1250451046-9966-12-git-send-email-vgoyal@redhat.com> <4A8CAAE2.1030804@cn.fujitsu.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4A8CAAE2.1030804@cn.fujitsu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Gui Jianfeng 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 List-Id: dm-devel.ids On Thu, Aug 20, 2009 at 09:46:10AM +0800, Gui Jianfeng wrote: > 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 Hi Gui, It does sound like that we need to clear ioq wait_request flag here. In fact upstream CFQ code is also not clearing this flag. Looking at the code, can't think why it should not be cleared here. Can you please also generate a patch for CFQ and post to lkml. Thanks Vivek > --- > 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)) { > /* > -- > 1.5.4.rc3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754599AbZHTNoW (ORCPT ); Thu, 20 Aug 2009 09:44:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754493AbZHTNoV (ORCPT ); Thu, 20 Aug 2009 09:44:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64975 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754455AbZHTNoU (ORCPT ); Thu, 20 Aug 2009 09:44:20 -0400 Date: Thu, 20 Aug 2009 09:42:21 -0400 From: Vivek Goyal To: Gui Jianfeng Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, dm-devel@redhat.com, jens.axboe@oracle.com, ryov@valinux.co.jp, balbir@linux.vnet.ibm.com, righi.andrea@gmail.com, nauman@google.com, dpshah@google.com, lizf@cn.fujitsu.com, mikew@google.com, fchecconi@gmail.com, paolo.valente@unimore.it, fernando@oss.ntt.co.jp, s-uchida@ap.jp.nec.com, taka@valinux.co.jp, jmoyer@redhat.com, dhaval@linux.vnet.ibm.com, m-ikeda@ds.jp.nec.com, agk@redhat.com, akpm@linux-foundation.org, peterz@infradead.org, jmarchan@redhat.com Subject: Re: [PATCH] IO-Controller: clear ioq wait flag if a request goes into that ioq Message-ID: <20090820134221.GC10615@redhat.com> References: <1250451046-9966-1-git-send-email-vgoyal@redhat.com> <1250451046-9966-12-git-send-email-vgoyal@redhat.com> <4A8CAAE2.1030804@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8CAAE2.1030804@cn.fujitsu.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 20, 2009 at 09:46:10AM +0800, Gui Jianfeng wrote: > 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 Hi Gui, It does sound like that we need to clear ioq wait_request flag here. In fact upstream CFQ code is also not clearing this flag. Looking at the code, can't think why it should not be cleared here. Can you please also generate a patch for CFQ and post to lkml. Thanks Vivek > --- > 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)) { > /* > -- > 1.5.4.rc3