Re: [sos-linux-ext-patches] [PATCH v2 1/6] sched/stats: Print domain name in /proc/schedstat

From: Sapkal, Swapnil
Date: Sun Nov 24 2024 - 22:49:24 EST


Hi Peter,

On 11/22/2024 4:38 PM, Peter Zijlstra wrote:
On Fri, Nov 22, 2024 at 02:25:22PM +0530, Sapkal, Swapnil wrote:
On 11/22/2024 2:14 PM, Swapnil Sapkal wrote:
From: K Prateek Nayak <kprateek.nayak@xxxxxxx>

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 schedstat` require displaying per-domain
information in user friendly manner, display the names of sched domain,
alongside their level in /proc/schedstat if CONFIG_SCHED_DEBUG is enabled.

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 ...

schedstat version has not been updated since this change merely adds
additional information to the domain name field and does not add a new
field altogether.

Signed-off-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Signed-off-by: Ravi Bangoria <ravi.bangoria@xxxxxxx>
Tested-by: James Clark <james.clark@xxxxxxxxxx>

Signed-off-by: Swapnil Sapkal <swapnil.sapkal@xxxxxxx>

Surely you mean either acked-by or reviewed-by ? Otherwise I suggest you
re-read the documentation on tags.

I took over the series from Ravi but forgot to add my S-o-b. I will make sure to include it from next time onward.

--
Thanks and Regards,
Swapnil