Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756934AbZGBUJb (ORCPT ); Thu, 2 Jul 2009 16:09:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755619AbZGBUD4 (ORCPT ); Thu, 2 Jul 2009 16:03:56 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53059 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755507AbZGBUDV (ORCPT ); Thu, 2 Jul 2009 16:03:21 -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 17/25] io-controller: deadline changes for hierarchical fair queuing Date: Thu, 2 Jul 2009 16:01:49 -0400 Message-Id: <1246564917-19603-18-git-send-email-vgoyal@redhat.com> In-Reply-To: <1246564917-19603-1-git-send-email-vgoyal@redhat.com> References: <1246564917-19603-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: 2298 Lines: 66 This patch changes deadline to use queue scheduling code from elevator layer. One can go back to old deadline by selecting CONFIG_IOSCHED_DEADLINE_HIER. Signed-off-by: Nauman Rafique Signed-off-by: Vivek Goyal --- block/Kconfig.iosched | 11 +++++++++++ block/deadline-iosched.c | 8 ++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index 9da6657..3a9e7d7 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -55,6 +55,17 @@ config IOSCHED_DEADLINE a disk at any one time, its behaviour is almost identical to the anticipatory I/O scheduler and so is a good choice. +config IOSCHED_DEADLINE_HIER + bool "Deadline Hierarchical Scheduling support" + depends on IOSCHED_DEADLINE && CGROUPS + select ELV_FAIR_QUEUING + select GROUP_IOSCHED + default n + ---help--- + Enable hierarhical scheduling in deadline. In this mode deadline keeps + one IO queue per cgroup instead of a global queue. Elevator + fair queuing logic ensures fairness among various queues. + config IOSCHED_CFQ tristate "CFQ I/O scheduler" select ELV_FAIR_QUEUING diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index 03d7208..ad63493 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c @@ -460,6 +460,11 @@ static struct elv_fs_entry deadline_attrs[] = { DD_ATTR(writes_starved), DD_ATTR(front_merges), DD_ATTR(fifo_batch), +#ifdef CONFIG_IOSCHED_DEADLINE_HIER + ELV_ATTR(fairness), + ELV_ATTR(slice_idle), + ELV_ATTR(slice_sync), +#endif __ATTR_NULL }; @@ -477,6 +482,9 @@ static struct elevator_type iosched_deadline = { .elevator_alloc_sched_queue_fn = deadline_alloc_deadline_queue, .elevator_free_sched_queue_fn = deadline_free_deadline_queue, }, +#ifdef CONFIG_IOSCHED_DEADLINE_HIER + .elevator_features = ELV_IOSCHED_NEED_FQ | ELV_IOSCHED_SINGLE_IOQ, +#endif .elevator_attrs = deadline_attrs, .elevator_name = "deadline", .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/