]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup/rstat: Tracking cgroup-level niced CPU time
authorJoshua Hahn <joshua.hahn6@gmail.com>
Wed, 2 Oct 2024 18:47:16 +0000 (11:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:35 +0000 (14:39 +0200)
commit39bc1484eb0663c84b2ec72c2960b2e01ef99545
tree96e83117b0620da14267f4efc335c46d3b0d6605
parentef79f2dec7a9df7f935530410727bb6b0ec82496
cgroup/rstat: Tracking cgroup-level niced CPU time

[ Upstream commit aefa398d93d5db7c555be78a605ff015357f127d ]

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 can facilitate more informed workload distribution.

A new field 'ntime' is added to struct cgroup_base_stat as opposed to
struct task_cputime to minimize footprint.

Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Stable-dep-of: c4af66a95aa3 ("cgroup/rstat: Fix forceidle time in cpu.stat")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/cgroup-defs.h
kernel/cgroup/rstat.c