diff options
author | Ben Blum <bblum@andrew.cmu.edu> | 2010-03-10 18:22:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:36 -0500 |
commit | 67523c48aa74d5637848edeccf285af1c60bf14a (patch) | |
tree | ebd14992e210c8dfb503ae5fdffc1f5392ad52df /kernel/cgroup.c | |
parent | 8ca712ea84728531d36841ca8f98f9e8680bcf4e (diff) |
cgroups: blkio subsystem as module
Modify the Block I/O cgroup subsystem to be able to be built as a module.
As the CFQ disk scheduler optionally depends on blk-cgroup, config options
in block/Kconfig, block/Kconfig.iosched, and block/blk-cgroup.h are
enhanced to support the new module dependency.
Signed-off-by: Ben Blum <bblum@andrew.cmu.edu>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index aa889c96cc7..521591dbab2 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -705,6 +705,7 @@ void cgroup_lock(void) | |||
705 | { | 705 | { |
706 | mutex_lock(&cgroup_mutex); | 706 | mutex_lock(&cgroup_mutex); |
707 | } | 707 | } |
708 | EXPORT_SYMBOL_GPL(cgroup_lock); | ||
708 | 709 | ||
709 | /** | 710 | /** |
710 | * cgroup_unlock - release lock on cgroup changes | 711 | * cgroup_unlock - release lock on cgroup changes |
@@ -715,6 +716,7 @@ void cgroup_unlock(void) | |||
715 | { | 716 | { |
716 | mutex_unlock(&cgroup_mutex); | 717 | mutex_unlock(&cgroup_mutex); |
717 | } | 718 | } |
719 | EXPORT_SYMBOL_GPL(cgroup_unlock); | ||
718 | 720 | ||
719 | /* | 721 | /* |
720 | * A couple of forward declarations required, due to cyclic reference loop: | 722 | * A couple of forward declarations required, due to cyclic reference loop: |
@@ -1639,6 +1641,7 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) | |||
1639 | memmove(buf, start, buf + buflen - start); | 1641 | memmove(buf, start, buf + buflen - start); |
1640 | return 0; | 1642 | return 0; |
1641 | } | 1643 | } |
1644 | EXPORT_SYMBOL_GPL(cgroup_path); | ||
1642 | 1645 | ||
1643 | /** | 1646 | /** |
1644 | * cgroup_attach_task - attach task 'tsk' to cgroup 'cgrp' | 1647 | * cgroup_attach_task - attach task 'tsk' to cgroup 'cgrp' |
@@ -1805,6 +1808,7 @@ bool cgroup_lock_live_group(struct cgroup *cgrp) | |||
1805 | } | 1808 | } |
1806 | return true; | 1809 | return true; |
1807 | } | 1810 | } |
1811 | EXPORT_SYMBOL_GPL(cgroup_lock_live_group); | ||
1808 | 1812 | ||
1809 | static int cgroup_release_agent_write(struct cgroup *cgrp, struct cftype *cft, | 1813 | static int cgroup_release_agent_write(struct cgroup *cgrp, struct cftype *cft, |
1810 | const char *buffer) | 1814 | const char *buffer) |
@@ -4082,6 +4086,7 @@ void __css_put(struct cgroup_subsys_state *css, int count) | |||
4082 | rcu_read_unlock(); | 4086 | rcu_read_unlock(); |
4083 | WARN_ON_ONCE(val < 1); | 4087 | WARN_ON_ONCE(val < 1); |
4084 | } | 4088 | } |
4089 | EXPORT_SYMBOL_GPL(__css_put); | ||
4085 | 4090 | ||
4086 | /* | 4091 | /* |
4087 | * Notify userspace when a cgroup is released, by running the | 4092 | * Notify userspace when a cgroup is released, by running the |
@@ -4197,6 +4202,7 @@ unsigned short css_id(struct cgroup_subsys_state *css) | |||
4197 | return cssid->id; | 4202 | return cssid->id; |
4198 | return 0; | 4203 | return 0; |
4199 | } | 4204 | } |
4205 | EXPORT_SYMBOL_GPL(css_id); | ||
4200 | 4206 | ||
4201 | unsigned short css_depth(struct cgroup_subsys_state *css) | 4207 | unsigned short css_depth(struct cgroup_subsys_state *css) |
4202 | { | 4208 | { |
@@ -4206,6 +4212,7 @@ unsigned short css_depth(struct cgroup_subsys_state *css) | |||
4206 | return cssid->depth; | 4212 | return cssid->depth; |
4207 | return 0; | 4213 | return 0; |
4208 | } | 4214 | } |
4215 | EXPORT_SYMBOL_GPL(css_depth); | ||
4209 | 4216 | ||
4210 | bool css_is_ancestor(struct cgroup_subsys_state *child, | 4217 | bool css_is_ancestor(struct cgroup_subsys_state *child, |
4211 | const struct cgroup_subsys_state *root) | 4218 | const struct cgroup_subsys_state *root) |
@@ -4242,6 +4249,7 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) | |||
4242 | spin_unlock(&ss->id_lock); | 4249 | spin_unlock(&ss->id_lock); |
4243 | call_rcu(&id->rcu_head, __free_css_id_cb); | 4250 | call_rcu(&id->rcu_head, __free_css_id_cb); |
4244 | } | 4251 | } |
4252 | EXPORT_SYMBOL_GPL(free_css_id); | ||
4245 | 4253 | ||
4246 | /* | 4254 | /* |
4247 | * This is called by init or create(). Then, calls to this function are | 4255 | * This is called by init or create(). Then, calls to this function are |
@@ -4358,6 +4366,7 @@ struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id) | |||
4358 | 4366 | ||
4359 | return rcu_dereference(cssid->css); | 4367 | return rcu_dereference(cssid->css); |
4360 | } | 4368 | } |
4369 | EXPORT_SYMBOL_GPL(css_lookup); | ||
4361 | 4370 | ||
4362 | /** | 4371 | /** |
4363 | * css_get_next - lookup next cgroup under specified hierarchy. | 4372 | * css_get_next - lookup next cgroup under specified hierarchy. |