[PATCH v4 2/2] cgroup/rstat: Selftests for niced CPU statistics

2024-10-02 Thread Joshua Hahn
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

[PATCH v4 1/2] cgroup/rstat: Tracking cgroup-level niced CPU time

2024-10-02 Thread Joshua Hahn
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

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

2024-10-02 Thread Joshua Hahn
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

Re: [PATCH v2 1/2] Tracking cgroup-level niced CPU time

2024-08-30 Thread Joshua Hahn
I will add cgroup/rstat to the patch title. Thank you again! Joshua

[PATCH v2 2/2] Selftests for niced CPU statistics

2024-08-30 Thread Joshua Hahn
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

[PATCH v2 1/2] Tracking cgroup-level niced CPU time

2024-08-30 Thread Joshua Hahn
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

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

2024-08-30 Thread Joshua Hahn
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

Re: [PATCH 1/2] Tracking cgroup-level niced CPU time

2024-08-29 Thread Joshua Hahn
CPU time to the userspace, allowing users to get a better understanding of their hardware limits and can facilitate more informed workload distribution. Thanks, Joshua

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

2024-08-26 Thread Joshua Hahn
time, and other tasks are running nonnice tasks. By including cgroup-level nice statistics, we can get a clearer picture and avoid overloading a host with too many high prio tasks. Like you suggested, this information can also help in re-prioritizing the processes, which may help high prio tasks become executed quicker. Thanks, Joshua

[PATCH 2/2] Selftests for niced CPU statistics

2024-08-23 Thread Joshua
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

[PATCH 1/2] Tracking cgroup-level niced CPU time

2024-08-23 Thread Joshua
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

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

2024-08-23 Thread Joshua
From: Joshua Hahn Niced CPU usage is a metric reported in host-level /proc/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 gauage how much of the task is being spent on niced