mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for K Prateek Nayak" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: K Prateek Nayak <kprateek.nayak@amd.com>,
	Ravi Bangoria <ravi.bangoria@amd.com>,
	Swapnil Sapkal <swapnil.sapkal@amd.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	James Clark <james.clark@linaro.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/stats: Print domain name in /proc/schedstat
Date: Tue, 24 Dec 2024 18:54:39 -0000	[thread overview]
Message-ID: <173506647928.399.3055132885672261082.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241220063224.17767-6-swapnil.sapkal@amd.com>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     011b3a14dc66c40066d08d60a768e14ede7ef351
Gitweb:        https://git.kernel.org/tip/011b3a14dc66c40066d08d60a768e14ede7ef351
Author:        K Prateek Nayak <kprateek.nayak@amd.com>
AuthorDate:    Fri, 20 Dec 2024 06:32:23 
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 20 Dec 2024 15:31:18 +01:00

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
---
 kernel/sched/stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 802bd93..5f56396 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -138,7 +138,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
 		for_each_domain(cpu, sd) {
 			enum cpu_idle_type itype;
 
-			seq_printf(seq, "domain%d %*pb", dcount++,
+			seq_printf(seq, "domain%d %s %*pb", dcount++, sd->name,
 				   cpumask_pr_args(sched_domain_span(sd)));
 			for (itype = 0; itype < CPU_MAX_IDLE_TYPES; itype++) {
 				seq_printf(seq, " %u %u %u %u %u %u %u %u %u %u %u",

  reply	other threads:[~2024-12-24 18:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20  6:32 [PATCH v2 0/6] Fixes and improvements " Swapnil Sapkal
2024-12-20  6:32 ` [PATCH v2 1/6] sched/fair: Fix value reported by hot tasks pulled " Swapnil Sapkal
2024-12-24 18:54   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2024-12-20  6:32 ` [PATCH v2 2/6] sched/fair: Cleanup in migrate_degrades_locality() to improve readability Swapnil Sapkal
2024-12-24 18:54   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2024-12-20  6:32 ` [PATCH v2 3/6] sched: Report the different kinds of imbalances in /proc/schedstat Swapnil Sapkal
2024-12-20 18:23   ` Shrikanth Hegde
2024-12-20 19:18     ` Shrikanth Hegde
2024-12-24 18:54   ` [tip: sched/core] " tip-bot2 for Swapnil Sapkal
2024-12-20  6:32 ` [PATCH v2 4/6] sched: Move sched domain name out of CONFIG_SCHED_DEBUG Swapnil Sapkal
2024-12-20 18:59   ` Shrikanth Hegde
2024-12-24  4:20     ` Sapkal, Swapnil
2024-12-24 18:54   ` [tip: sched/core] " tip-bot2 for Swapnil Sapkal
2024-12-20  6:32 ` [PATCH v2 5/6] sched/stats: Print domain name in /proc/schedstat Swapnil Sapkal
2024-12-24 18:54   ` tip-bot2 for K Prateek Nayak [this message]
2024-12-20  6:32 ` [PATCH v2 6/6] docs: Update Schedstat version to 17 Swapnil Sapkal
2024-12-20 19:02   ` Shrikanth Hegde
2024-12-23  7:35   ` Shrikanth Hegde
2024-12-24  5:40     ` Sapkal, Swapnil
2024-12-24 18:54   ` [tip: sched/core] " tip-bot2 for Swapnil Sapkal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=173506647928.399.3055132885672261082.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=james.clark@linaro.org \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=swapnil.sapkal@amd.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®