From patchwork Tue May 26 22:42:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Goyal X-Patchwork-Id: 26228 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 n4R07tGp008847 for ; Wed, 27 May 2009 00:07:55 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 5014461A02B; Tue, 26 May 2009 20:07:55 -0400 (EDT) Received: from int-mx2.corp.redhat.com ([172.16.27.26]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n4QMgJUB003962 for ; Tue, 26 May 2009 18:42:19 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4QMgElG032156; Tue, 26 May 2009 18:42:15 -0400 Received: from spicy.usersys (dhcp-100-18-201.bos.redhat.com [10.16.18.201]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4QMgE7a029429; Tue, 26 May 2009 18:42:14 -0400 Received: by spicy.usersys (Postfix, from userid 10451) id 12EE9204FC0; Tue, 26 May 2009 18:42:10 -0400 (EDT) From: Vivek Goyal To: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, dm-devel@redhat.com, jens.axboe@oracle.com, nauman@google.com, dpshah@google.com, lizf@cn.fujitsu.com, mikew@google.com, fchecconi@gmail.com, paolo.valente@unimore.it, ryov@valinux.co.jp, fernando@oss.ntt.co.jp, s-uchida@ap.jp.nec.com, taka@valinux.co.jp, guijianfeng@cn.fujitsu.com, jmoyer@redhat.com, dhaval@linux.vnet.ibm.com, balbir@linux.vnet.ibm.com, righi.andrea@gmail.com, m-ikeda@ds.jp.nec.com, jbaron@redhat.com Date: Tue, 26 May 2009 18:42:00 -0400 Message-Id: <1243377729-2176-12-git-send-email-vgoyal@redhat.com> In-Reply-To: <1243377729-2176-1-git-send-email-vgoyal@redhat.com> References: <1243377729-2176-1-git-send-email-vgoyal@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Tue, 26 May 2009 20:07:40 -0400 Cc: peterz@infradead.org, akpm@linux-foundation.org, snitzer@redhat.com, agk@redhat.com, vgoyal@redhat.com Subject: [dm-devel] [PATCH 11/20] io-controller: noop changes for hierarchical fair queuing 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 This patch changes noop to use queue scheduling code from elevator layer. One can go back to old noop by deselecting CONFIG_IOSCHED_NOOP_HIER. Signed-off-by: Nauman Rafique Signed-off-by: Vivek Goyal --- block/Kconfig.iosched | 11 +++++++++++ block/noop-iosched.c | 3 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index a91a807..9da6657 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -25,6 +25,17 @@ config IOSCHED_NOOP that do their own scheduling and require only minimal assistance from the kernel. +config IOSCHED_NOOP_HIER + bool "Noop Hierarchical Scheduling support" + depends on IOSCHED_NOOP && CGROUPS + select ELV_FAIR_QUEUING + select GROUP_IOSCHED + default n + ---help--- + Enable hierarhical scheduling in noop. In this mode noop keeps + one IO queue per cgroup instead of a global queue. Elevator + fair queuing logic ensures fairness among various queues. + config IOSCHED_AS tristate "Anticipatory I/O scheduler" default y diff --git a/block/noop-iosched.c b/block/noop-iosched.c index d587832..73e571d 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -92,6 +92,9 @@ static struct elevator_type elevator_noop = { .elevator_alloc_sched_queue_fn = noop_alloc_noop_queue, .elevator_free_sched_queue_fn = noop_free_noop_queue, }, +#ifdef CONFIG_IOSCHED_NOOP_HIER + .elevator_features = ELV_IOSCHED_NEED_FQ | ELV_IOSCHED_SINGLE_IOQ, +#endif .elevator_name = "noop", .elevator_owner = THIS_MODULE, };