Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759715AbZFSUlk (ORCPT ); Fri, 19 Jun 2009 16:41:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758371AbZFSUjD (ORCPT ); Fri, 19 Jun 2009 16:39:03 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56646 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872AbZFSUiy (ORCPT ); Fri, 19 Jun 2009 16:38:54 -0400 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 Cc: agk@redhat.com, snitzer@redhat.com, vgoyal@redhat.com, akpm@linux-foundation.org, peterz@infradead.org Subject: [PATCH 11/20] io-controller: noop changes for hierarchical fair queuing Date: Fri, 19 Jun 2009 16:37:29 -0400 Message-Id: <1245443858-8487-12-git-send-email-vgoyal@redhat.com> In-Reply-To: <1245443858-8487-1-git-send-email-vgoyal@redhat.com> References: <1245443858-8487-1-git-send-email-vgoyal@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2300 Lines: 71 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 | 13 +++++++++++++ 2 files changed, 24 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 731dbf2..97ea41b 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -82,6 +82,15 @@ static void noop_free_noop_queue(struct elevator_queue *e, void *sched_queue) kfree(nq); } +#ifdef CONFIG_IOSCHED_NOOP_HIER +static struct elv_fs_entry noop_attrs[] = { + ELV_ATTR(fairness), + ELV_ATTR(slice_idle), + ELV_ATTR(slice_sync), + __ATTR_NULL +}; +#endif + static struct elevator_type elevator_noop = { .ops = { .elevator_merge_req_fn = noop_merged_requests, @@ -92,6 +101,10 @@ 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, + .elevator_attrs = noop_attrs, +#endif .elevator_name = "noop", .elevator_owner = THIS_MODULE, }; -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/