cgroup: Adding test_cpucg_nested_weight_overprovisioned() testcase
authorDavid Vernet <void@manifault.com>
Sat, 23 Apr 2022 12:30:50 +0000 (05:30 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 25 Apr 2022 17:27:31 +0000 (07:27 -1000)
commitb76ee4f576ebfbab3891e51a531ec7ad7ef10a7a
tree4752431f50df11f5cffea0b012f5ae9d96f087a6
parent4ab93063c83a2478863158799b027e9489ad4a40
cgroup: Adding test_cpucg_nested_weight_overprovisioned() testcase

The cgroup cpu controller tests in
tools/testing/selftests/cgroup/test_cpu.c have some testcases that validate
the expected behavior of setting cpu.weight on cgroups, and then hogging
CPUs. What is still missing from the suite is a testcase that validates
nested cgroups. This patch adds test_cpucg_nested_weight_overprovisioned(),
which validates that a parent's cpu.weight will override its children if
they overcommit a host, and properly protect any sibling groups of that
parent.

Signed-off-by: David Vernet <void@manifault.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_cpu.c