* [PATCH] sched: Print the sd->level in sched_domain_debug code
@ 2008-05-29 15:26 Gautham R Shenoy
2008-06-02 11:03 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Gautham R Shenoy @ 2008-05-29 15:26 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Peter Zijlstra
sched: Print the sd->level in sched_domain_debug code
From: Gautham R Shenoy <ego@in.ibm.com>
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>
---
kernel/sched.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 1846451..7b81114 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6638,6 +6638,28 @@ void __init migration_init(void)
#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,
cpumask_t *groupmask)
{
@@ -6657,7 +6679,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
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)) {
printk(KERN_ERR "ERROR: domain->span does not contain "
--
Thanks and Regards
gautham
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched: Print the sd->level in sched_domain_debug code
2008-05-29 15:26 [PATCH] sched: Print the sd->level in sched_domain_debug code Gautham R Shenoy
@ 2008-06-02 11:03 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-06-02 11:03 UTC (permalink / raw)
To: Gautham R Shenoy; +Cc: linux-kernel, Peter Zijlstra
* Gautham R Shenoy <ego@in.ibm.com> wrote:
> sched: Print the sd->level in sched_domain_debug code
>
> From: Gautham R Shenoy <ego@in.ibm.com>
>
> 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>
applied to tip/sched-devel. Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-02 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 15:26 [PATCH] sched: Print the sd->level in sched_domain_debug code Gautham R Shenoy
2008-06-02 11:03 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®