diff options
author | Ben Blum <bblum@andrew.cmu.edu> | 2010-03-10 18:22:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:36 -0500 |
commit | cf5d5941fda647fe3d2f2d00cf9e0245236a5f08 (patch) | |
tree | deee6501f2f08089a2cd62732c3848a59a6f6a93 /Documentation/cgroups | |
parent | e6a1105ba08b265023dd71a4174fb4a29ebc7083 (diff) |
cgroups: subsystem module unloading
Provides support for unloading modular subsystems.
This patch adds a new function cgroup_unload_subsys which is to be used
for removing a loaded subsystem during module deletion. Reference
counting of the subsystems' modules is moved from once (at load time) to
once per attached hierarchy (in parse_cgroupfs_options and
rebind_subsystems) (i.e., 0 or 1).
Signed-off-by: Ben Blum <bblum@andrew.cmu.edu>
Acked-by: 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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/cgroups')
-rw-r--r-- | Documentation/cgroups/cgroups.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index ae8a037a761e..764007b63921 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt | |||
@@ -489,8 +489,9 @@ Each subsystem should: | |||
489 | - define a cgroup_subsys object called <name>_subsys | 489 | - define a cgroup_subsys object called <name>_subsys |
490 | 490 | ||
491 | If a subsystem can be compiled as a module, it should also have in its | 491 | If a subsystem can be compiled as a module, it should also have in its |
492 | module initcall a call to cgroup_load_subsys(&its_subsys_struct). It | 492 | module initcall a call to cgroup_load_subsys(), and in its exitcall a |
493 | should also set its_subsys.module = THIS_MODULE in its .c file. | 493 | call to cgroup_unload_subsys(). It should also set its_subsys.module = |
494 | THIS_MODULE in its .c file. | ||
494 | 495 | ||
495 | Each subsystem may export the following methods. The only mandatory | 496 | Each subsystem may export the following methods. The only mandatory |
496 | methods are create/destroy. Any others that are null are presumed to | 497 | methods are create/destroy. Any others that are null are presumed to |