Skip to content

Commit e50f97d

Browse files
committed
sched: Move sched domain name out of CONFIG_SCHED_DEBUG
JIRA: https://issues.redhat.com/browse/RHEL-24185 commit 1c055a0 Author: Swapnil Sapkal <swapnil.sapkal@amd.com> Date: Fri Dec 20 06:32:22 2024 +0000 sched: Move sched domain name out of CONFIG_SCHED_DEBUG /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> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241220063224.17767-5-swapnil.sapkal@amd.com Signed-off-by: Phil Auld <pauld@redhat.com>
1 parent c37fce7 commit e50f97d

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

include/linux/sched/topology.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ struct sched_domain {
140140
unsigned int ttwu_move_affine;
141141
unsigned int ttwu_move_balance;
142142
#endif
143-
#ifdef CONFIG_SCHED_DEBUG
144143
char *name;
145-
#endif
146144
union {
147145
void *private; /* used during construction */
148146
struct rcu_head rcu; /* used during destruction */
@@ -198,18 +196,12 @@ struct sched_domain_topology_level {
198196
int flags;
199197
int numa_level;
200198
struct sd_data data;
201-
#ifdef CONFIG_SCHED_DEBUG
202199
char *name;
203-
#endif
204200
};
205201

206202
extern void __init set_sched_topology(struct sched_domain_topology_level *tl);
207203

208-
#ifdef CONFIG_SCHED_DEBUG
209204
# define SD_INIT_NAME(type) .name = #type
210-
#else
211-
# define SD_INIT_NAME(type)
212-
#endif
213205

214206
#else /* CONFIG_SMP */
215207

kernel/sched/topology.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,9 +1635,7 @@ sd_init(struct sched_domain_topology_level *tl,
16351635
.max_newidle_lb_cost = 0,
16361636
.last_decay_max_lb_cost = jiffies,
16371637
.child = child,
1638-
#ifdef CONFIG_SCHED_DEBUG
16391638
.name = tl->name,
1640-
#endif
16411639
};
16421640

16431641
sd_span = sched_domain_span(sd);
@@ -2338,10 +2336,8 @@ static struct sched_domain *build_sched_domain(struct sched_domain_topology_leve
23382336
if (!cpumask_subset(sched_domain_span(child),
23392337
sched_domain_span(sd))) {
23402338
pr_err("BUG: arch topology borken\n");
2341-
#ifdef CONFIG_SCHED_DEBUG
23422339
pr_err(" the %s domain not a subset of the %s domain\n",
23432340
child->name, sd->name);
2344-
#endif
23452341
/* Fixup, ensure @sd has at least @child CPUs. */
23462342
cpumask_or(sched_domain_span(sd),
23472343
sched_domain_span(sd),

0 commit comments

Comments
 (0)