K Prateek Nayak 011b3a14dc sched/stats: Print domain name in /proc/schedstat
Currently, there does not exist a straightforward way to extract the
names of the sched domains and match them to the per-cpu domain entry in
/proc/schedstat other than looking at the debugfs files which are only
visible after enabling "verbose" debug after commit 34320745dfc9
("sched/debug: Put sched/domains files under the verbose flag")

Since tools like `perf sched stats`[1] require displaying per-domain
information in user friendly manner, display the names of sched domain,
alongside their level in /proc/schedstat.

Domain names also makes the /proc/schedstat data unambiguous when some
of the cpus are offline. For example, on a 128 cpus AMD Zen3 machine
where CPU0 and CPU64 are SMT siblings and CPU64 is offline:

Before:
    cpu0 ...
    domain0 ...
    domain1 ...
    cpu1 ...
    domain0 ...
    domain1 ...
    domain2 ...

After:
    cpu0 ...
    domain0 MC ...
    domain1 PKG ...
    cpu1 ...
    domain0 SMT ...
    domain1 MC ...
    domain2 PKG ...

[1] https://lore.kernel.org/lkml/20241122084452.1064968-1-swapnil.sapkal@amd.com/

Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20241220063224.17767-6-swapnil.sapkal@amd.com
2024-12-20 15:31:18 +01:00
..
2024-11-22 20:36:11 -08:00
2024-11-20 09:54:49 -08:00
2024-11-25 12:11:55 -08:00
2024-06-15 10:43:06 -07:00
2024-11-27 10:20:50 -08:00
2024-11-20 09:21:11 -08:00
2024-11-18 17:34:05 -08:00
2024-11-29 11:43:29 -08:00
2024-07-29 10:45:54 -07:00
2024-11-05 17:12:28 -08:00
2024-09-03 21:15:26 -07:00
2024-11-03 01:28:06 -05:00
2024-09-19 10:18:15 +02:00
2023-12-01 09:51:44 -08:00
2024-11-03 01:28:06 -05:00
2024-09-27 08:18:43 -07:00
2023-10-04 10:41:57 -07:00
2023-12-29 12:22:29 -08:00
2024-07-18 12:19:20 -07:00
2024-11-18 18:10:37 -08:00
2024-11-03 01:28:06 -05:00
2024-05-30 15:31:38 -07:00
2024-11-22 20:36:11 -08:00
2024-11-03 01:28:06 -05:00