aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorSerge E. Hallyn <[email protected]>2007-10-19 06:39:45 +0000
committerLinus Torvalds <[email protected]>2007-10-19 18:53:37 +0000
commit858d72ead4864da0fb0b89b919524125ce998e27 (patch)
tree19ea321ca3b505efecb2053a829daf89a6a22529 /fs/proc/array.c
parentAdd cgroupstats (diff)
downloadkernel-858d72ead4864da0fb0b89b919524125ce998e27.tar.gz
kernel-858d72ead4864da0fb0b89b919524125ce998e27.zip
cgroups: implement namespace tracking subsystem
When a task enters a new namespace via a clone() or unshare(), a new cgroup is created and the task moves into it. This version names cgroups which are automatically created using cgroup_clone() as "node_<pid>" where pid is the pid of the unsharing or cloned process. (Thanks Pavel for the idea) This is safe because if the process unshares again, it will create /cgroups/(...)/node_<pid>/node_<pid> The only possibilities (AFAICT) for a -EEXIST on unshare are 1. pid wraparound 2. a process fails an unshare, then tries again. Case 1 is unlikely enough that I ignore it (at least for now). In case 2, the node_<pid> will be empty and can be rmdir'ed to make the subsequent unshare() succeed. Changelog: Name cloned cgroups as "node_<pid>". [[email protected]: fix order of cgroup subsystems in init/Kconfig] Signed-off-by: Serge E. Hallyn <[email protected]> Cc: Paul Menage <[email protected]> Signed-off-by: Cedric Le Goater <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions