From patchwork Sun Oct 4 11:33:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Galbraith X-Patchwork-Id: 51584 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 n94BY3xC021062 for ; Sun, 4 Oct 2009 11:34:03 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 6B6906193BD; Sun, 4 Oct 2009 07:34:03 -0400 (EDT) Received: from int-mx01.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 n94BXwSe004866 for ; Sun, 4 Oct 2009 07:33:58 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n94BXvqT018112 for ; Sun, 4 Oct 2009 07:33:57 -0400 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id n94BXjkT015092 for ; Sun, 4 Oct 2009 07:33:46 -0400 Received: (qmail invoked by alias); 04 Oct 2009 11:33:44 -0000 Received: from p4FE1A487.dip0.t-ipconnect.de (EHLO [192.168.178.27]) [79.225.164.135] by mail.gmx.net (mp056) with SMTP; 04 Oct 2009 13:33:44 +0200 X-Authenticated: #14349625 X-Provags-ID: V01U2FsdGVkX192qpQ21wB2Pksvr3yhs3TuBt1VrpUpjw62ARxcWN cvnWnaRgGNJKjq From: Mike Galbraith To: Jens Axboe In-Reply-To: <1254653434.7237.18.camel@marge.simson.net> References: <20091003124049.GB12925@redhat.com> <20091003132115.GB31616@kernel.dk> <20091003135623.GD12925@redhat.com> <1254578553.7499.5.camel@marge.simson.net> <20091003142840.GE31616@kernel.dk> <1254581496.8293.8.camel@marge.simson.net> <20091003151445.GF31616@kernel.dk> <1254585420.7539.2.camel@marge.simson.net> <20091003173532.GG31616@kernel.dk> <1254596864.7153.9.camel@marge.simson.net> <20091003192321.GA26573@kernel.dk> <1254599386.7153.46.camel@marge.simson.net> <1254653434.7237.18.camel@marge.simson.net> Date: Sun, 04 Oct 2009 13:33:33 +0200 Message-Id: <1254656013.7098.2.camel@marge.simson.net> Mime-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5600000000000001 X-RedHat-Spam-Score: -0.87 (AWL) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.5 X-loop: dm-devel@redhat.com Cc: dhaval@linux.vnet.ibm.com, peterz@infradead.org, dm-devel@redhat.com, dpshah@google.com, agk@redhat.com, balbir@linux.vnet.ibm.com, paolo.valente@unimore.it, jmarchan@redhat.com, fernando@oss.ntt.co.jp, Ulrich Lukas , mikew@google.com, jmoyer@redhat.com, nauman@google.com, Ingo Molnar , Vivek Goyal , m-ikeda@ds.jp.nec.com, riel@redhat.com, lizf@cn.fujitsu.com, fchecconi@gmail.com, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, righi.andrea@gmail.com, Linus Torvalds Subject: [dm-devel] Re: Do not overload dispatch queue (Was: Re: IO scheduler based IO controller V10) 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 Index: linux-2.6/block/cfq-iosched.c =================================================================== --- linux-2.6.orig/block/cfq-iosched.c +++ linux-2.6/block/cfq-iosched.c @@ -1343,17 +1343,18 @@ static int cfq_dispatch_requests(struct */ if (!cfq_cfqq_sync(cfqq) && cfqd->cfq_desktop) { unsigned long last_sync = jiffies - cfqd->last_end_sync_rq; + unsigned long slice = cfq_slice_async; unsigned int depth; /* * must wait a bit longer */ - if (last_sync < cfq_slice_sync) { - cfq_schedule_dispatch(cfqd, cfq_slice_sync - last_sync); + if (last_sync < slice) { + cfq_schedule_dispatch(cfqd, slice - last_sync); return 0; } - depth = last_sync / cfq_slice_sync; + depth = last_sync / slice; if (depth < max_dispatch) max_dispatch = depth; }