[PATCH v4 0/2] Exposing nice CPU usage to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changes in v4
	- Removed unnecessary forking from selftest.
	- Style changes in rstat.c (fallthrough & indents)
	- Fixed a selftest bug that raised false negatives, caused by
		cputime_adjust sometimes adjusting utime below ntime.
	- Reworded cover letter for clarity & motivation
Changes in v3
	- Signed-off-by & renamed subject for clarity.
Changes in v2
	- Edited commit messages for clarity.

Niced CPU usage is a metric reported in host-level /proc/stat, but is
not currently reported in cgroup-level statistics. Thus, even if one
can observe that a fracion of the host's CPU time is spent on (non-)nice
tasks, the distribution of the CPU usage across cgroups is not readily
available to the user.

This patch introduces cgroup-level niced CPU utilization to cpu.stat.
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. For instance, service routers will be
able to probe cgroups in the host to determine CPU time spent on niced
processes in each cgroup, and direct more traffic to cgroups with lower
non-nice CPU utilization.

Signed-off-by Joshua Hahn <joshua.hahnjy@xxxxxxxxx>

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/cgroup/test_cpu.c | 75 +++++++++++++++++++++++
 3 files changed, 90 insertions(+), 5 deletions(-)
-- 
2.43.5





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux