[lkml]   [2014]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectAttaching a cgroup subsystem to multiple hierarchies
Reading cgroups.txt and casting around the net leads me to believe that it is possible to attach a cgroup subsystem (e.g. memory) to multiple hierarchies, but this seems to result in “mirrored” hierarchies which are automatically kept in step with each other - essentially it looks like the same hierarchy at multiple file system paths.

Take the following interaction for example:

$ pwd
$ mkdir mem1
$ mkdir mem2
$ sudo su
# mount -t cgroup -o memory none /home/vagrant/mem1
# mount -t cgroup -o memory none /home/vagrant/mem2
# cd mem1
# mkdir inst1
# ls inst1
cgroup.clone_children memory.failcnt ...
# ls ../mem2
cgroup.clone_children inst1 memory.limit_in_bytes ...
# cd inst1
# echo 1000000 > memory.limit_in_bytes
# cat memory.limit_in_bytes
# cat ../../mem2/inst1/memory.limit_in_bytes
# echo $$ > tasks
# cat tasks
# cat ../../mem2/inst1/tasks

Is this working as intended? Is there some other way to attach a subsystem to *distinct* hierarchies? Distinct hierarchies would allow distinct cgroups, distinct settings (e.g. memory.limit_in_bytes) and distinct partitions of the tasks in the system.

Note: I don’t have a good use for this function - I’m simply trying to reverse engineer the semantics of cgroups to get a precise understanding.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2014-02-05 16:21    [W:1.505 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site