Skip to content

Commit 20a9e21

Browse files
committed
sched: Move sched domain name out of CONFIG_SCHED_DEBUG
JIRA: https://issues.redhat.com/browse/RHEL-23495 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 dc620dd commit 20a9e21

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 */
@@ -202,18 +200,12 @@ struct sched_domain_topology_level {
202200
int flags;
203201
int numa_level;
204202
struct sd_data data;
205-
#ifdef CONFIG_SCHED_DEBUG
206203
char *name;
207-
#endif
208204
};
209205

210206
extern void __init set_sched_topology(struct sched_domain_topology_level *tl);
211207

212-
#ifdef CONFIG_SCHED_DEBUG
213208
# define SD_INIT_NAME(type) .name = #type
214-
#else
215-
# define SD_INIT_NAME(type)
216-
#endif
217209

218210
#else /* CONFIG_SMP */
219211

kernel/sched/topology.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,9 +1628,7 @@ sd_init(struct sched_domain_topology_level *tl,
16281628
.max_newidle_lb_cost = 0,
16291629
.last_decay_max_lb_cost = jiffies,
16301630
.child = child,
1631-
#ifdef CONFIG_SCHED_DEBUG
16321631
.name = tl->name,
1633-
#endif
16341632
};
16351633

16361634
sd_span = sched_domain_span(sd);
@@ -2331,10 +2329,8 @@ static struct sched_domain *build_sched_domain(struct sched_domain_topology_leve
23312329
if (!cpumask_subset(sched_domain_span(child),
23322330
sched_domain_span(sd))) {
23332331
pr_err("BUG: arch topology borken\n");
2334-
#ifdef CONFIG_SCHED_DEBUG
23352332
pr_err(" the %s domain not a subset of the %s domain\n",
23362333
child->name, sd->name);
2337-
#endif
23382334
/* Fixup, ensure @sd has at least @child CPUs. */
23392335
cpumask_or(sched_domain_span(sd),
23402336
sched_domain_span(sd),

0 commit comments

Comments
 (0)