diff options
Diffstat (limited to 'Documentation/cgroups.txt')
-rw-r--r-- | Documentation/cgroups.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt index 553727cc9944..98a26f81fa75 100644 --- a/Documentation/cgroups.txt +++ b/Documentation/cgroups.txt | |||
@@ -176,7 +176,9 @@ Control Groups extends the kernel as follows: | |||
176 | subsystem state is something that's expected to happen frequently | 176 | subsystem state is something that's expected to happen frequently |
177 | and in performance-critical code, whereas operations that require a | 177 | and in performance-critical code, whereas operations that require a |
178 | task's actual cgroup assignments (in particular, moving between | 178 | task's actual cgroup assignments (in particular, moving between |
179 | cgroups) are less common. | 179 | cgroups) are less common. A linked list runs through the cg_list |
180 | field of each task_struct using the css_set, anchored at | ||
181 | css_set->tasks. | ||
180 | 182 | ||
181 | - A cgroup hierarchy filesystem can be mounted for browsing and | 183 | - A cgroup hierarchy filesystem can be mounted for browsing and |
182 | manipulation from user space. | 184 | manipulation from user space. |
@@ -252,6 +254,16 @@ linear search to locate an appropriate existing css_set, so isn't | |||
252 | very efficient. A future version will use a hash table for better | 254 | very efficient. A future version will use a hash table for better |
253 | performance. | 255 | performance. |
254 | 256 | ||
257 | To allow access from a cgroup to the css_sets (and hence tasks) | ||
258 | that comprise it, a set of cg_cgroup_link objects form a lattice; | ||
259 | each cg_cgroup_link is linked into a list of cg_cgroup_links for | ||
260 | a single cgroup on its cont_link_list field, and a list of | ||
261 | cg_cgroup_links for a single css_set on its cg_link_list. | ||
262 | |||
263 | Thus the set of tasks in a cgroup can be listed by iterating over | ||
264 | each css_set that references the cgroup, and sub-iterating over | ||
265 | each css_set's task set. | ||
266 | |||
255 | The use of a Linux virtual file system (vfs) to represent the | 267 | The use of a Linux virtual file system (vfs) to represent the |
256 | cgroup hierarchy provides for a familiar permission and name space | 268 | cgroup hierarchy provides for a familiar permission and name space |
257 | for cgroups, with a minimum of additional kernel code. | 269 | for cgroups, with a minimum of additional kernel code. |