Clean up patch dir; synchronize patches with kernel-power v48
[kernel-bfs] / kernel-bfs-2.6.28 / debian / patches / bfq / iosched-bfq-03-update-kconfig-kbuild.patch
1 Subject: [PATCH 03/03] block: add cgroups, kconfig and build bits for BFQ
2
3 Add a Kconfig option and do the related Makefile changes to compile
4 the BFQ I/O scheduler.  Also let the cgroups subsystem know about the
5 BFQ I/O controller.
6
7 Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
8 Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
9 ---
10  block/Kconfig.iosched         |   25 +++++++++++++++++++++++++
11  block/Makefile                |    1 +
12  include/linux/cgroup_subsys.h |    6 ++++++
13  3 files changed, 32 insertions(+), 0 deletions(-)
14
15 diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
16 index 7e803fc..f0681b3 100644
17 --- a/block/Kconfig.iosched
18 +++ b/block/Kconfig.iosched
19 @@ -40,6 +40,27 @@ config IOSCHED_CFQ
20           working environment, suitable for desktop systems.
21           This is the default I/O scheduler.
22  
23 +config IOSCHED_BFQ
24 +       tristate "BFQ I/O scheduler"
25 +       depends on EXPERIMENTAL
26 +       default n
27 +       ---help---
28 +         The BFQ I/O scheduler tries to distribute bandwidth among
29 +         all processes in the system, according to their weights,
30 +         which can be set using task ioprio values.  It aims at giving
31 +         deterministic guarantees on the distribution of the service
32 +         provided.  If compiled built-in (saying Y here), BFQ can
33 +         be configured to support hierarchical scheduling.
34 +
35 +config CGROUP_BFQIO
36 +       bool "BFQ hierarchical scheduling support"
37 +       depends on CGROUPS && IOSCHED_BFQ=y
38 +       default n
39 +       ---help---
40 +         Enable hierarchical scheduling in BFQ, using the cgroups
41 +         filesystem interface.  The name of the subsystem will be
42 +         bfqio.
43 +
44  choice
45         prompt "Default I/O scheduler"
46         default DEFAULT_CFQ
47 @@ -56,6 +77,9 @@ choice
48         config DEFAULT_CFQ
49                 bool "CFQ" if IOSCHED_CFQ=y
50  
51 +       config DEFAULT_BFQ
52 +               bool "BFQ" if IOSCHED_BFQ=y
53 +
54         config DEFAULT_NOOP
55                 bool "No-op"
56  
57 @@ -66,6 +90,7 @@ config DEFAULT_IOSCHED
58         default "anticipatory" if DEFAULT_AS
59         default "deadline" if DEFAULT_DEADLINE
60         default "cfq" if DEFAULT_CFQ
61 +       default "bfq" if DEFAULT_BFQ
62         default "noop" if DEFAULT_NOOP
63  
64  endmenu
65 diff --git a/block/Makefile b/block/Makefile
66 index 208000b..fa41b6e 100644
67 --- a/block/Makefile
68 +++ b/block/Makefile
69 @@ -12,6 +12,7 @@ obj-$(CONFIG_IOSCHED_NOOP)    += noop-iosched.o
70  obj-$(CONFIG_IOSCHED_AS)       += as-iosched.o
71  obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
72  obj-$(CONFIG_IOSCHED_CFQ)      += cfq-iosched.o
73 +obj-$(CONFIG_IOSCHED_BFQ)      += bfq-iosched.o
74  
75  obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o
76  obj-$(CONFIG_BLOCK_COMPAT)     += compat_ioctl.o
77 diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
78 index e287745..981b199 100644
79 --- a/include/linux/cgroup_subsys.h
80 +++ b/include/linux/cgroup_subsys.h
81 @@ -48,3 +48,9 @@ SUBSYS(devices)
82  #endif
83  
84  /* */
85 +
86 +#ifdef CONFIG_CGROUP_BFQIO
87 +SUBSYS(bfqio)
88 +#endif
89 +
90 +/* */