diff options
author | Gautham R Shenoy <ego@in.ibm.com> | 2008-05-29 11:26:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-06 09:19:41 -0400 |
commit | 099f98c8a1f13501a98afbfff4756395a610581c (patch) | |
tree | 7948f026ebd702b43575c74a7c839c632f66c67e | |
parent | e29c98d12b3f02d6ac711c60b4a5f8a46d1cf19b (diff) |
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: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/sched.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index ef4e25604bbe..dc0be113f41d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6197,6 +6197,28 @@ void __init migration_init(void) | |||
6197 | 6197 | ||
6198 | #ifdef CONFIG_SCHED_DEBUG | 6198 | #ifdef CONFIG_SCHED_DEBUG |
6199 | 6199 | ||
6200 | static inline const char *sd_level_to_string(enum sched_domain_level lvl) | ||
6201 | { | ||
6202 | switch (lvl) { | ||
6203 | case SD_LV_NONE: | ||
6204 | return "NONE"; | ||
6205 | case SD_LV_SIBLING: | ||
6206 | return "SIBLING"; | ||
6207 | case SD_LV_MC: | ||
6208 | return "MC"; | ||
6209 | case SD_LV_CPU: | ||
6210 | return "CPU"; | ||
6211 | case SD_LV_NODE: | ||
6212 | return "NODE"; | ||
6213 | case SD_LV_ALLNODES: | ||
6214 | return "ALLNODES"; | ||
6215 | case SD_LV_MAX: | ||
6216 | return "MAX"; | ||
6217 | |||
6218 | } | ||
6219 | return "MAX"; | ||
6220 | } | ||
6221 | |||
6200 | static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, | 6222 | static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, |
6201 | cpumask_t *groupmask) | 6223 | cpumask_t *groupmask) |
6202 | { | 6224 | { |
@@ -6216,7 +6238,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level, | |||
6216 | return -1; | 6238 | return -1; |
6217 | } | 6239 | } |
6218 | 6240 | ||
6219 | printk(KERN_CONT "span %s\n", str); | 6241 | printk(KERN_CONT "span %s level %s\n", |
6242 | str, sd_level_to_string(sd->level)); | ||
6220 | 6243 | ||
6221 | if (!cpu_isset(cpu, sd->span)) { | 6244 | if (!cpu_isset(cpu, sd->span)) { |
6222 | printk(KERN_ERR "ERROR: domain->span does not contain " | 6245 | printk(KERN_ERR "ERROR: domain->span does not contain " |