diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/Kconfig.iosched | 4 | ||||
-rw-r--r-- | block/blk-cgroup.c | 17 | ||||
-rw-r--r-- | block/blk-cgroup.h | 10 |
3 files changed, 2 insertions, 29 deletions
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index 3199b76f795d..421bef9c4c48 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched | |||
@@ -23,8 +23,6 @@ config IOSCHED_DEADLINE | |||
23 | 23 | ||
24 | config IOSCHED_CFQ | 24 | config IOSCHED_CFQ |
25 | tristate "CFQ I/O scheduler" | 25 | tristate "CFQ I/O scheduler" |
26 | # If BLK_CGROUP is a module, CFQ has to be built as module. | ||
27 | depends on (BLK_CGROUP=m && m) || !BLK_CGROUP || BLK_CGROUP=y | ||
28 | default y | 26 | default y |
29 | ---help--- | 27 | ---help--- |
30 | The CFQ I/O scheduler tries to distribute bandwidth equally | 28 | The CFQ I/O scheduler tries to distribute bandwidth equally |
@@ -34,8 +32,6 @@ config IOSCHED_CFQ | |||
34 | 32 | ||
35 | This is the default I/O scheduler. | 33 | This is the default I/O scheduler. |
36 | 34 | ||
37 | Note: If BLK_CGROUP=m, then CFQ can be built only as module. | ||
38 | |||
39 | config CFQ_GROUP_IOSCHED | 35 | config CFQ_GROUP_IOSCHED |
40 | bool "CFQ Group Scheduling support" | 36 | bool "CFQ Group Scheduling support" |
41 | depends on IOSCHED_CFQ && BLK_CGROUP | 37 | depends on IOSCHED_CFQ && BLK_CGROUP |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 75642a352a8f..970a717a056f 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -50,10 +50,7 @@ struct cgroup_subsys blkio_subsys = { | |||
50 | .attach = blkiocg_attach, | 50 | .attach = blkiocg_attach, |
51 | .destroy = blkiocg_destroy, | 51 | .destroy = blkiocg_destroy, |
52 | .populate = blkiocg_populate, | 52 | .populate = blkiocg_populate, |
53 | #ifdef CONFIG_BLK_CGROUP | ||
54 | /* note: blkio_subsys_id is otherwise defined in blk-cgroup.h */ | ||
55 | .subsys_id = blkio_subsys_id, | 53 | .subsys_id = blkio_subsys_id, |
56 | #endif | ||
57 | .use_id = 1, | 54 | .use_id = 1, |
58 | .module = THIS_MODULE, | 55 | .module = THIS_MODULE, |
59 | }; | 56 | }; |
@@ -1679,17 +1676,3 @@ void blkio_policy_unregister(struct blkio_policy_type *blkiop) | |||
1679 | spin_unlock(&blkio_list_lock); | 1676 | spin_unlock(&blkio_list_lock); |
1680 | } | 1677 | } |
1681 | EXPORT_SYMBOL_GPL(blkio_policy_unregister); | 1678 | EXPORT_SYMBOL_GPL(blkio_policy_unregister); |
1682 | |||
1683 | static int __init init_cgroup_blkio(void) | ||
1684 | { | ||
1685 | return cgroup_load_subsys(&blkio_subsys); | ||
1686 | } | ||
1687 | |||
1688 | static void __exit exit_cgroup_blkio(void) | ||
1689 | { | ||
1690 | cgroup_unload_subsys(&blkio_subsys); | ||
1691 | } | ||
1692 | |||
1693 | module_init(init_cgroup_blkio); | ||
1694 | module_exit(exit_cgroup_blkio); | ||
1695 | MODULE_LICENSE("GPL"); | ||
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 6f3ace7e792f..355168772f51 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -24,13 +24,7 @@ enum blkio_policy_id { | |||
24 | /* Max limits for throttle policy */ | 24 | /* Max limits for throttle policy */ |
25 | #define THROTL_IOPS_MAX UINT_MAX | 25 | #define THROTL_IOPS_MAX UINT_MAX |
26 | 26 | ||
27 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) | 27 | #ifdef CONFIG_BLK_CGROUP |
28 | |||
29 | #ifndef CONFIG_BLK_CGROUP | ||
30 | /* When blk-cgroup is a module, its subsys_id isn't a compile-time constant */ | ||
31 | extern struct cgroup_subsys blkio_subsys; | ||
32 | #define blkio_subsys_id blkio_subsys.subsys_id | ||
33 | #endif | ||
34 | 28 | ||
35 | enum stat_type { | 29 | enum stat_type { |
36 | /* Total time spent (in ns) between request dispatch to the driver and | 30 | /* Total time spent (in ns) between request dispatch to the driver and |
@@ -303,7 +297,7 @@ static inline void blkiocg_update_idle_time_stats(struct blkio_group *blkg) {} | |||
303 | static inline void blkiocg_set_start_empty_time(struct blkio_group *blkg) {} | 297 | static inline void blkiocg_set_start_empty_time(struct blkio_group *blkg) {} |
304 | #endif | 298 | #endif |
305 | 299 | ||
306 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) | 300 | #ifdef CONFIG_BLK_CGROUP |
307 | extern struct blkio_cgroup blkio_root_cgroup; | 301 | extern struct blkio_cgroup blkio_root_cgroup; |
308 | extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); | 302 | extern struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup); |
309 | extern struct blkio_cgroup *task_blkio_cgroup(struct task_struct *tsk); | 303 | extern struct blkio_cgroup *task_blkio_cgroup(struct task_struct *tsk); |