aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cgroups
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-07-08 18:02:57 -0400
committerTejun Heo <tj@kernel.org>2014-07-08 18:02:57 -0400
commitaf0ba6789c8e43518635606d0af1ff475ba7471a (patch)
treee191c511bc1102149d4e44b196ec96691179f67f /Documentation/cgroups
parentb4536f0cab2b18414e26101a2b9d484c5cbea0c0 (diff)
cgroup: implement cgroup_subsys->depends_on
Currently, the blkio subsystem attributes all of writeback IOs to the root. One of the issues is that there's no way to tell who originated a writeback IO from block layer. Those IOs are usually issued asynchronously from a task which didn't have anything to do with actually generating the dirty pages. The memory subsystem, when enabled, already keeps track of the ownership of each dirty page and it's desirable for blkio to piggyback instead of adding its own per-page tag. blkio piggybacking on memory is an implementation detail which preferably should be handled automatically without requiring explicit userland action. To achieve that, this patch implements cgroup_subsys->depends_on which contains the mask of subsystems which should be enabled together when the subsystem is enabled. The previous patches already implemented the support for enabled but invisible subsystems and cgroup_subsys->depends_on can be easily implemented by updating cgroup_refresh_child_subsys_mask() so that it calculates cgroup->child_subsys_mask considering cgroup_subsys->depends_on of the explicitly enabled subsystems. Documentation/cgroups/unified-hierarchy.txt is updated to explain that subsystems may not become immediately available after being unused from userland and that dependency could be a factor in it. As subsystems may already keep residual references, this doesn't significantly change how subsystem rebinding can be used. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Diffstat (limited to 'Documentation/cgroups')
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt
index 324b182e6000..a7a2205539a7 100644
--- a/Documentation/cgroups/unified-hierarchy.txt
+++ b/Documentation/cgroups/unified-hierarchy.txt
@@ -97,9 +97,26 @@ change soon.
97All controllers which are not bound to other hierarchies are 97All controllers which are not bound to other hierarchies are
98automatically bound to unified hierarchy and show up at the root of 98automatically bound to unified hierarchy and show up at the root of
99it. Controllers which are enabled only in the root of unified 99it. Controllers which are enabled only in the root of unified
100hierarchy can be bound to other hierarchies at any time. This allows 100hierarchy can be bound to other hierarchies. This allows mixing
101mixing unified hierarchy with the traditional multiple hierarchies in 101unified hierarchy with the traditional multiple hierarchies in a fully
102a fully backward compatible way. 102backward compatible way.
103
104A controller can be moved across hierarchies only after the controller
105is no longer referenced in its current hierarchy. Because per-cgroup
106controller states are destroyed asynchronously and controllers may
107have lingering references, a controller may not show up immediately on
108the unified hierarchy after the final umount of the previous
109hierarchy. Similarly, a controller should be fully disabled to be
110moved out of the unified hierarchy and it may take some time for the
111disabled controller to become available for other hierarchies;
112furthermore, due to dependencies among controllers, other controllers
113may need to be disabled too.
114
115While useful for development and manual configurations, dynamically
116moving controllers between the unified and other hierarchies is
117strongly discouraged for production use. It is recommended to decide
118the hierarchies and controller associations before starting using the
119controllers.
103 120
104 121
1052-2. cgroup.subtree_control 1222-2. cgroup.subtree_control