tools/cgset: add -R option to recursively set variables
Add -R option to recursively set variable(s) passed to cgroups under
<cgroup_path>. This will help users to set a controller setting for
all the cgroups under a cgroup hierarchy, instead of passing the
cgroups multiple times on the command line.
Without the patch
------------------
./cgset -r cpu.shares=256 foo
./cgget -r cpu.shares foo
foo/ch1 foo/ch2
foo:
cpu.shares: 256
foo/ch1:
cpu.shares: 1024
foo/ch2:
cpu.shares: 1024
With the patch
--------------
./cgset -R -r cpu.shares=512 foo
./cgget -r cpu.shares foo foo/ch1 foo/ch2
foo:
cpu.shares: 512
foo/ch1:
cpu.shares: 512
foo/ch2:
cpu.shares: 512
[check for ECGEOF recommend by Tom Hromatka] Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>