diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-05 16:14:54 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-06 15:27:21 -0500 |
commit | 32e380aedc3de454c06ce1c254fe3bea35a676e1 (patch) | |
tree | ae48ced36af22f020451cb05ecca835ff561dc9d /block/blk-cgroup.h | |
parent | b855b04a0b2213dbc1b59cf936056726e7ed97ad (diff) |
blkcg: make CONFIG_BLK_CGROUP bool
Block cgroup core can be built as module; however, it isn't too useful
as blk-throttle can only be built-in and cfq-iosched is usually the
default built-in scheduler. Scheduled blkcg cleanup requires calling
into blkcg from block core. To simplify that, disallow building blkcg
as module by making CONFIG_BLK_CGROUP bool.
If building blkcg core as module really matters, which I doubt, we can
revisit it after blkcg API cleanup.
-v2: Vivek pointed out that IOSCHED_CFQ was incorrectly updated to
depend on BLK_CGROUP. Fixed.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 10 |
1 files changed, 2 insertions, 8 deletions
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); |