From patchwork Tue Jun 9 02:08:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Goyal X-Patchwork-Id: 28794 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 n5929Sjw017654 for ; Tue, 9 Jun 2009 02:09:28 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 525946189B9; Mon, 8 Jun 2009 22:09:27 -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 n5929KCF017203 for ; Mon, 8 Jun 2009 22:09:20 -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 n5929EQO001848; Mon, 8 Jun 2009 22:09:14 -0400 Received: from machine.usersys.redhat.com (vpn-10-77.bos.redhat.com [10.16.10.77]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5929DhR025008; Mon, 8 Jun 2009 22:09:13 -0400 Received: by machine.usersys.redhat.com (Postfix, from userid 10451) id CB747266C0; Mon, 8 Jun 2009 22:09:02 -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: Mon, 8 Jun 2009 22:08:55 -0400 Message-Id: <1244513342-11758-13-git-send-email-vgoyal@redhat.com> In-Reply-To: <1244513342-11758-1-git-send-email-vgoyal@redhat.com> References: <1244513342-11758-1-git-send-email-vgoyal@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-loop: dm-devel@redhat.com Cc: peterz@infradead.org, akpm@linux-foundation.org, snitzer@redhat.com, agk@redhat.com, vgoyal@redhat.com Subject: [dm-devel] [PATCH 12/19] io-controller: deadline 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 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 | 3 +++ 2 files changed, 14 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 3a195ce..4cda105 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c @@ -477,6 +477,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,