Skip to content

Commit bb6405e

Browse files
kherstorvalds
authored andcommitted
Documentation: update cgroup pid and cpuset information
The cgroup documentation does not specify how a process can be removed from a particular group. This patch adds a note at the end of the simple example about how this is done. Also, some cgroups (like cpusets) require user input before a new group can be used. This is noted in the patch as well. Signed-off-by: Eric B Munson <emunson@mgebm.net> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ca3b78a commit bb6405e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎Documentation/cgroups/cgroups.txt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
349349
The "xxx" is not interpreted by the cgroup code, but will appear in
350350
/proc/mounts so may be any useful identifying string that you like.
351351

352+
Note: Some subsystems do not work without some user input first. For instance,
353+
if cpusets are enabled the user will have to populate the cpus and mems files
354+
for each new cgroup created before that group can be used.
355+
352356
To mount a cgroup hierarchy with just the cpuset and memory
353357
subsystems, type:
354358
# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +430,14 @@ You can attach the current shell task by echoing 0:
426430

427431
# echo 0 > tasks
428432

433+
Note: Since every task is always a member of exactly one cgroup in each
434+
mounted hierarchy, to remove a task from its current cgroup you must
435+
move it into a new cgroup (possibly the root cgroup) by writing to the
436+
new cgroup's tasks file.
437+
438+
Note: If the ns cgroup is active, moving a process to another cgroup can
439+
fail.
440+
429441
2.3 Mounting hierarchies by name
430442
--------------------------------
431443

0 commit comments

Comments
 (0)