From: Joshua Hahn
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
From: Joshua Hahn
Cgroup-level CPU statistics currently include time spent on
user/system processes, but do not include niced CPU time (despite
already being tracked). This patch exposes niced CPU time to the
userspace, allowing users to get a better understanding of their
hardware limits and
ower
non-nice CPU utilization.
Signed-off-by Joshua Hahn
Joshua Hahn (2):
Tracking cgroup-level niced CPU time
Selftests for niced CPU statistics
include/linux/cgroup-defs.h | 1 +
kernel/cgroup/rstat.c | 19 --
tools/testing/selftests/cgrou
Hello, thank you for reviewing the v2.
> Patch looks fine to me but can you please do the followings?
>
> - Add subsystem prefix to the patch titles. Look other commits for examples.
> - Add Signed-off-by to both.
> --
> tejun
I will send out a v3 with the signed-off-by, and I will add
cgroup/rst
From: Joshua Hahn
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
From: Joshua Hahn
Cgroup-level CPU statistics currently include time spent on
user/system processes, but do not include niced CPU time (despite
already being tracked). This patch exposes niced CPU time to the
userspace, allowing users to get a better understanding of their
hardware limits and
From: Joshua Hahn
v1 -> v2: Edited commit messages for clarity.
Niced CPU usage is a metric reported in host-level /prot/stat, but is
not reported in cgroup-level statistics in cpu.stat. However, when a
host contains multiple tasks across different workloads, it becomes
difficult to gauge
Hello, thank you for reviewing the patch.
> > Cgroup-level CPU statistics currently include time spent on
> > user/system processes, but do not include niced CPU time (despite
> > already being tracked). This patch exposes niced CPU time to the
> > userspace, allowing users to get a better underst
Hello, thank you for reviewing the patch.
On Mon, Aug 26, 2024 at 10:43 AM Michal Koutný wrote:
> The difference between the two metrics is in cputime.c:
> index = (task_nice(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
>
> > Exposing this metric will allow load balancers to correctly probe the