From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: <peterz@infradead.org>, <mingo@redhat.com>,
<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
<corbet@lwn.net>
Cc: <dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<iamjoonsoo.kim@lge.com>, <qyousef@layalina.io>,
<sshegde@linux.ibm.com>, <alexs@kernel.org>,
<lukasz.luba@arm.com>, <gautham.shenoy@amd.com>,
<kprateek.nayak@amd.com>, <ravi.bangoria@amd.com>,
<swapnil.sapkal@amd.com>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>
Subject: [PATCH v2 4/6] sched: Move sched domain name out of CONFIG_SCHED_DEBUG
Date: Fri, 20 Dec 2024 06:32:22 +0000 [thread overview]
Message-ID: <20241220063224.17767-5-swapnil.sapkal@amd.com> (raw)
In-Reply-To: <20241220063224.17767-1-swapnil.sapkal@amd.com>
/proc/schedstat file shows cpu and sched domain level scheduler
statistics. It does not show domain name instead shows domain level.
It will be very useful for tools like `perf sched stats`[1] to
aggragate domain level stats if domain names are shown in /proc/schedstat.
But sched domain name is guarded by CONFIG_SCHED_DEBUG. As per the
discussion[2], move sched domain name out of CONFIG_SCHED_DEBUG.
[1] https://lore.kernel.org/lkml/20241122084452.1064968-1-swapnil.sapkal@amd.com/
[2] https://lore.kernel.org/lkml/fcefeb4d-3acb-462d-9c9b-3df8d927e522@amd.com/
Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
---
include/linux/sched/topology.h | 8 --------
kernel/sched/topology.c | 4 ----
2 files changed, 12 deletions(-)
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 76a662e1ec24..7f3dbafe1817 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -143,9 +143,7 @@ struct sched_domain {
unsigned int ttwu_move_affine;
unsigned int ttwu_move_balance;
#endif
-#ifdef CONFIG_SCHED_DEBUG
char *name;
-#endif
union {
void *private; /* used during construction */
struct rcu_head rcu; /* used during destruction */
@@ -201,18 +199,12 @@ struct sched_domain_topology_level {
int flags;
int numa_level;
struct sd_data data;
-#ifdef CONFIG_SCHED_DEBUG
char *name;
-#endif
};
extern void __init set_sched_topology(struct sched_domain_topology_level *tl);
-#ifdef CONFIG_SCHED_DEBUG
# define SD_INIT_NAME(type) .name = #type
-#else
-# define SD_INIT_NAME(type)
-#endif
#else /* CONFIG_SMP */
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index 9c405f0e7b26..da33ec9e94ab 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1635,9 +1635,7 @@ sd_init(struct sched_domain_topology_level *tl,
.max_newidle_lb_cost = 0,
.last_decay_max_lb_cost = jiffies,
.child = child,
-#ifdef CONFIG_SCHED_DEBUG
.name = tl->name,
-#endif
};
sd_span = sched_domain_span(sd);
@@ -2338,10 +2336,8 @@ static struct sched_domain *build_sched_domain(struct sched_domain_topology_leve
if (!cpumask_subset(sched_domain_span(child),
sched_domain_span(sd))) {
pr_err("BUG: arch topology borken\n");
-#ifdef CONFIG_SCHED_DEBUG
pr_err(" the %s domain not a subset of the %s domain\n",
child->name, sd->name);
-#endif
/* Fixup, ensure @sd has at least @child CPUs. */
cpumask_or(sched_domain_span(sd),
sched_domain_span(sd),
--
2.43.0
next prev parent reply other threads:[~2024-12-20 6:34 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 in /proc/schedstat 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 ` Swapnil Sapkal [this message]
2024-12-20 18:59 ` [PATCH v2 4/6] sched: Move sched domain name out of CONFIG_SCHED_DEBUG 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: sched/core] " tip-bot2 for K Prateek Nayak
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=20241220063224.17767-5-swapnil.sapkal@amd.com \
--to=swapnil.sapkal@amd.com \
--cc=alexs@kernel.org \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=gautham.shenoy@amd.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=ravi.bangoria@amd.com \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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®