Commit 099f98c8 authored by Gautham R Shenoy's avatar Gautham R Shenoy Committed by Ingo Molnar

sched: print the sd->level in sched_domain_debug code

While printing out the visual representation of the sched-domains, print
the level (MC, SMT, CPU, NODE, ... ) of each of the sched_domains.

Credit: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarGautham R Shenoy <ego@in.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e29c98d1
...@@ -6197,6 +6197,28 @@ void __init migration_init(void) ...@@ -6197,6 +6197,28 @@ void __init migration_init(void)
#ifdef CONFIG_SCHED_DEBUG #ifdef CONFIG_SCHED_DEBUG
static inline const char *sd_level_to_string(enum sched_domain_level lvl)
{
switch (lvl) {
case SD_LV_NONE:
return "NONE";
case SD_LV_SIBLING:
return "SIBLING";
case SD_LV_MC:
return "MC";
case SD_LV_CPU:
return "CPU";
case SD_LV_NODE:
return "NODE";
case SD_LV_ALLNODES:
return "ALLNODES";
case SD_LV_MAX:
return "MAX";
}
return "MAX";
}
static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
cpumask_t *groupmask) cpumask_t *groupmask)
{ {
...@@ -6216,7 +6238,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, ...@@ -6216,7 +6238,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
return -1; return -1;
} }
printk(KERN_CONT "span %s\n", str); printk(KERN_CONT "span %s level %s\n",
str, sd_level_to_string(sd->level));
if (!cpu_isset(cpu, sd->span)) { if (!cpu_isset(cpu, sd->span)) {
printk(KERN_ERR "ERROR: domain->span does not contain " printk(KERN_ERR "ERROR: domain->span does not contain "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment