]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
when we use cgsnapshot with the given controller, the result always
authorWeng Meiling <wengmeiling.weng@huawei.com>
Tue, 23 Jul 2013 12:30:33 +0000 (14:30 +0200)
committerWeng Meiling <wengmeiling.weng@huawei.com>
Tue, 23 Jul 2013 12:30:33 +0000 (14:30 +0200)
commitbaafbef76670f0bd9bf0269648cf3c3565d53d4d
treebb9e5a0f77dfec22b83be3287970d1f386e0503c
parent3548d77f01be8dc59258443196251bc80cc5b1da
when we use cgsnapshot with the given controller, the result always
displays
the last mounted controller which is not specified, so fix it.

Example:

# lssubsys  -m
cpuset /cgroup/cpuset
cpu /cgroup/cpu
# lscgroup
cpu:/
cpu:/test
cpuset:/
cpuset:/test

before the patch:

# cgsnapshot -s cpu
# Configuration file generated by cgsnapshot
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
}

group test {
cpu {
cpu.rt_period_us="1000000";
cpu.rt_runtime_us="0";
cpu.shares="1024";
}
}

group test {
cpuset {
cpuset.memory_spread_slab="0";
cpuset.memory_spread_page="0";
cpuset.memory_migrate="0";
cpuset.sched_relax_domain_level="-1";
cpuset.sched_load_balance="1";
cpuset.mem_hardwall="0";
cpuset.mem_exclusive="0";
cpuset.cpu_exclusive="0";
cpuset.mems="";
cpuset.cpus="";
}
}

after the patch:

# cgsnapshot -s cpu
# Configuration file generated by cgsnapshot
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
}

group test {
cpu {
cpu.rt_period_us="1000000";
cpu.rt_runtime_us="0";
cpu.shares="1024";
}
}

Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
src/tools/cgsnapshot.c