public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Exposing nice CPU usage to userspace
@ 2024-08-30 14:19 Joshua Hahn
  2024-08-30 14:19 ` [PATCH v2 1/2] Tracking cgroup-level niced CPU time Joshua Hahn
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Joshua Hahn @ 2024-08-30 14:19 UTC (permalink / raw)
  To: tj
  Cc: cgroups, hannes, linux-kernel, linux-kselftest, lizefan.x,
	mkoutny, shuah

From: Joshua Hahn <joshua.hahn6@gmail.com>

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 how much of the task is being spent on niced
processes based on /proc/stat alone, since host-level metrics do not
provide this cgroup-level granularity.

Exposing this metric will allow users to accurately probe the niced CPU
metric for each workload, and make more informed decisions when
directing higher priority tasks.

Joshua Hahn (2):
  Tracking cgroup-level niced CPU time
  Selftests for niced CPU statistics

 include/linux/cgroup-defs.h               |  1 +
 kernel/cgroup/rstat.c                     | 16 ++++-
 tools/testing/selftests/cgroup/test_cpu.c | 72 +++++++++++++++++++++++
 3 files changed, 86 insertions(+), 3 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-10 21:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 14:19 [PATCH v2 0/2] Exposing nice CPU usage to userspace Joshua Hahn
2024-08-30 14:19 ` [PATCH v2 1/2] Tracking cgroup-level niced CPU time Joshua Hahn
2024-08-30 19:41   ` Tejun Heo
2024-08-30 20:06     ` Joshua Hahn
2024-08-30 14:19 ` [PATCH v2 2/2] Selftests for niced CPU statistics Joshua Hahn
2024-09-02 15:45 ` [PATCH v2 0/2] Exposing nice CPU usage to userspace Michal Koutný
2024-09-10 21:01   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox