Skip to content

Commit 1c055a0

Browse files
SSapkalPeter Zijlstra
authored andcommitted
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/[email protected]/ [2] https://lore.kernel.org/lkml/[email protected]/ Suggested-by: "Gautham R. Shenoy" <[email protected]> Signed-off-by: Swapnil Sapkal <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3b2a793 commit 1c055a0

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
@@ -143,9 +143,7 @@ struct sched_domain {
143143
unsigned int ttwu_move_affine;
144144
unsigned int ttwu_move_balance;
145145
#endif
146-
#ifdef CONFIG_SCHED_DEBUG
147146
char *name;
148-
#endif
149147
union {
150148
void *private; /* used during construction */
151149
struct rcu_head rcu; /* used during destruction */
@@ -201,18 +199,12 @@ struct sched_domain_topology_level {
201199
int flags;
202200
int numa_level;
203201
struct sd_data data;
204-
#ifdef CONFIG_SCHED_DEBUG
205202
char *name;
206-
#endif
207203
};
208204

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

211-
#ifdef CONFIG_SCHED_DEBUG
212207
# define SD_INIT_NAME(type) .name = #type
213-
#else
214-
# define SD_INIT_NAME(type)
215-
#endif
216208

217209
#else /* CONFIG_SMP */
218210

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)