cgroup/rstat: Selftests for niced CPU statistics

Creates a cgroup with a single nice CPU hog process running.
fork() is called to generate the nice process because un-nicing is
not possible (see man nice(3)). If fork() was not used to generate
the CPU hog, we would run the rest of the cgroup selftest suite as a
nice process.

Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Joshua Hahn 2024-10-02 11:47:17 -07:00 • committed by Tejun Heo
commit 2e82c0d456