public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Print sched_group::__cpu_power in sched_domain_debug.
@ 2009-03-30  4:55 Gautham R Shenoy
  2009-03-30  4:55 ` Gautham R Shenoy
  0 siblings, 1 reply; 13+ messages in thread
From: Gautham R Shenoy @ 2009-03-30  4:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Peter Zijlstra

A simple patch to print the value of __cpu_power in sched_domain_debug.

---

Gautham R Shenoy (1):
      sched: Print sched_group::__cpu_power in sched_domain_debug.


 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

-- 
Thanks and Regards
gautham.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] sched: Print sched_group::__cpu_power in sched_domain_debug.
  2009-03-30  4:55 [PATCH] sched: Print sched_group::__cpu_power in sched_domain_debug Gautham R Shenoy
@ 2009-03-30  4:55 ` Gautham R Shenoy
  2009-04-01 16:03   ` [tip:sched/urgent] " Gautham R Shenoy
  0 siblings, 1 reply; 13+ messages in thread
From: Gautham R Shenoy @ 2009-03-30  4:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Peter Zijlstra, Gautham R Shenoy

If the user changes the value of the sched_mc/smt_power_savings sysfs tunable,
it'll trigger a rebuilding of the whole sched_domain tree, with the
SD_POWERSAVINGS_BALANCE flag set at certain levels.

As a result, there would be a change in the __cpu_power of sched_groups
in the sched_domain hierarchy.

Print the __cpu_power values for each sched_group in sched_domain_debug
to help verify this change and correlate it with the change in the
load-balancing behavior.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
---

 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 706517c..fbac83b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7363,7 +7363,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s", str);
+		printk(KERN_CONT " %s (__cpu_power = %d)", str,
+						group->__cpu_power);
 
 		group = group->next;
 	} while (group != sd->groups);


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-03-30  4:55 ` Gautham R Shenoy
@ 2009-04-01 16:03   ` Gautham R Shenoy
  2009-04-13 18:53     ` Tony Luck
  0 siblings, 1 reply; 13+ messages in thread
From: Gautham R Shenoy @ 2009-04-01 16:03 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, ego, hpa, mingo, a.p.zijlstra, tglx, mingo

Commit-ID:  46e0bb9c12f4bab539736f1714cbf16600f681ec
Gitweb:     http://git.kernel.org/tip/46e0bb9c12f4bab539736f1714cbf16600f681ec
Author:     Gautham R Shenoy <ego@in.ibm.com>
AuthorDate: Mon, 30 Mar 2009 10:25:20 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 1 Apr 2009 17:58:03 +0200

sched: Print sched_group::__cpu_power in sched_domain_debug

Impact: extend debug info /proc/sched_debug

If the user changes the value of the sched_mc/smt_power_savings sysfs
tunable, it'll trigger a rebuilding of the whole sched_domain tree,
with the SD_POWERSAVINGS_BALANCE flag set at certain levels.

As a result, there would be a change in the __cpu_power of sched_groups
in the sched_domain hierarchy.

Print the __cpu_power values for each sched_group in sched_domain_debug
to help verify this change and correlate it with the change in the
load-balancing behavior.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090330045520.2869.24777.stgit@sofia.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/sched.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 8d1bdbe..6234d10 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6963,7 +6963,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s", str);
+		printk(KERN_CONT " %s (__cpu_power = %d)", str,
+						group->__cpu_power);
 
 		group = group->next;
 	} while (group != sd->groups);

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [tip:sched/urgent] sched: Print sched_group::__cpu_power in  sched_domain_debug
  2009-04-01 16:03   ` [tip:sched/urgent] " Gautham R Shenoy
@ 2009-04-13 18:53     ` Tony Luck
  2009-04-14  0:09       ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: Tony Luck @ 2009-04-13 18:53 UTC (permalink / raw)
  To: mingo, hpa, ego, linux-kernel, a.p.zijlstra, tglx, mingo
  Cc: linux-tip-commits

> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -6963,7 +6963,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
>                cpumask_or(groupmask, groupmask, sched_group_cpus(group));
>
>                cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
> -               printk(KERN_CONT " %s", str);
> +               printk(KERN_CONT " %s (__cpu_power = %d)", str,
> +                                               group->__cpu_power);

This has added a lot of clutter to the console log during boot
(especially on large systems).

Here is the start of the diff output comparing old and new console
messages on a 16 cpu machine:

77c77
<   groups: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
---
>   groups: 0 (__cpu_power = 1024) 1 (__cpu_power = 1024) 2 (__cpu_power = 1024) 3 (__cpu_power = 1024) 4 (__cpu_power = 1024) 5 (__cpu_power = 1024) 6 (__cpu_power = 1024) 7 (__cpu_power = 1024) 8 (
__cpu_power = 1024) 9 (__cpu_power = 1024) 10 (__cpu_power = 1024) 11
(__cpu_power = 1024) 12 (__cpu_power = 1024) 13 (__cpu_power = 1024)
14 (__cpu_power = 1024) 15 (__cpu_power = 1024)
80c80
<   groups: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0
---
>   groups: 1 (__cpu_power = 1024) 2 (__cpu_power = 1024) 3 (__cpu_power = 1024) 4 (__cpu_power = 1024) 5 (__cpu_power = 1024) 6 (__cpu_power = 1024) 7 (__cpu_power = 1024) 8 (__cpu_power = 1024) 9 (
__cpu_power = 1024) 10 (__cpu_power = 1024) 11 (__cpu_power = 1024) 12
(__cpu_power = 1024) 13 (__cpu_power = 1024) 14 (__cpu_power = 1024)
15 (__cpu_power = 1024) 0 (__cpu_power = 1024)

continues as each group is reported.

-Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-13 18:53     ` Tony Luck
@ 2009-04-14  0:09       ` Ingo Molnar
  2009-04-14  3:39         ` Gautham R Shenoy
  0 siblings, 1 reply; 13+ messages in thread
From: Ingo Molnar @ 2009-04-14  0:09 UTC (permalink / raw)
  To: Tony Luck
  Cc: mingo, hpa, ego, linux-kernel, a.p.zijlstra, tglx,
	linux-tip-commits


* Tony Luck <tony.luck@intel.com> wrote:

> > --- a/kernel/sched.c
> > +++ b/kernel/sched.c
> > @@ -6963,7 +6963,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
> >                cpumask_or(groupmask, groupmask, sched_group_cpus(group));
> >
> >                cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
> > -               printk(KERN_CONT " %s", str);
> > +               printk(KERN_CONT " %s (__cpu_power = %d)", str,
> > +                                               group->__cpu_power);
> 
> This has added a lot of clutter to the console log during boot
> (especially on large systems).
> 
> Here is the start of the diff output comparing old and new console
> messages on a 16 cpu machine:
> 
> 77c77
> <   groups: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> ---
> >   groups: 0 (__cpu_power = 1024) 1 (__cpu_power = 1024) 2 (__cpu_power = 1024) 3 (__cpu_power = 1024) 4 (__cpu_power = 1024) 5 (__cpu_power = 1024) 6 (__cpu_power = 1024) 7 (__cpu_power = 1024) 8 (
> __cpu_power = 1024) 9 (__cpu_power = 1024) 10 (__cpu_power = 1024) 11
> (__cpu_power = 1024) 12 (__cpu_power = 1024) 13 (__cpu_power = 1024)
> 14 (__cpu_power = 1024) 15 (__cpu_power = 1024)
> 80c80

indeed ...

I think we should skip the printout in the default (power==1024) 
case. Gautham?

	Ingo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-14  0:09       ` Ingo Molnar
@ 2009-04-14  3:39         ` Gautham R Shenoy
  2009-04-14 12:03           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
                             ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gautham R Shenoy @ 2009-04-14  3:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Tony Luck, mingo, hpa, linux-kernel, a.p.zijlstra, tglx,
	linux-tip-commits

On Tue, Apr 14, 2009 at 02:09:34AM +0200, Ingo Molnar wrote:
> 
> * Tony Luck <tony.luck@intel.com> wrote:
> 
> > > --- a/kernel/sched.c
> > > +++ b/kernel/sched.c
> > > @@ -6963,7 +6963,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
> > >                cpumask_or(groupmask, groupmask, sched_group_cpus(group));
> > >
> > >                cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
> > > -               printk(KERN_CONT " %s", str);
> > > +               printk(KERN_CONT " %s (__cpu_power = %d)", str,
> > > +                                               group->__cpu_power);
> > 
> > This has added a lot of clutter to the console log during boot
> > (especially on large systems).
> > 
> > Here is the start of the diff output comparing old and new console
> > messages on a 16 cpu machine:
> > 
> > 77c77
> > <   groups: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> > ---
> > >   groups: 0 (__cpu_power = 1024) 1 (__cpu_power = 1024) 2 (__cpu_power = 1024) 3 (__cpu_power = 1024) 4 (__cpu_power = 1024) 5 (__cpu_power = 1024) 6 (__cpu_power = 1024) 7 (__cpu_power = 1024) 8 (
> > __cpu_power = 1024) 9 (__cpu_power = 1024) 10 (__cpu_power = 1024) 11
> > (__cpu_power = 1024) 12 (__cpu_power = 1024) 13 (__cpu_power = 1024)
> > 14 (__cpu_power = 1024) 15 (__cpu_power = 1024)
> > 80c80
> 
> indeed ...
> 
> I think we should skip the printout in the default (power==1024) 
> case. Gautham?

Makes sense. Patch appended.
> 
> 	Ingo
-->

sched: Avoid printing sched_group::__cpu_power for default case.

From: Gautham R Shenoy <ego@in.ibm.com>

The following commit produces a messy dmesg output while attempting to print
the sched_group::__cpu_power for each group in the sched_domain hierarchy.

commit 46e0bb9c12f4bab539736f1714cbf16600f681ec
Author: Gautham R Shenoy <ego@in.ibm.com>
Date:   Mon Mar 30 10:25:20 2009 +0530
sched: Print sched_group::__cpu_power in sched_domain_debug

Fix this by avoid printing the __cpu_power for default cases.
(i.e, __cpu_power == SCHED_LOAD_SCALE).

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
---

 kernel/sched.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/kernel/sched.c b/kernel/sched.c
index 681d4ae..0584e04 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7467,8 +7467,9 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s (__cpu_power = %d)", str,
-						group->__cpu_power);
+		if (group->__cpu_power != SCHED_LOAD_SCALE)
+			printk(KERN_CONT " %s (__cpu_power = %d)", str,
+							group->__cpu_power);
 
 		group = group->next;
 	} while (group != sd->groups);
-- 
Thanks and Regards
gautham

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case
  2009-04-14  3:39         ` Gautham R Shenoy
@ 2009-04-14 12:03           ` tip-bot for Gautham R Shenoy
  2009-04-14 16:29           ` [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug Luck, Tony
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: tip-bot for Gautham R Shenoy @ 2009-04-14 12:03 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, ego, hpa, mingo, tony.luck, tglx, mingo

Commit-ID:  fa0dacb0eec2f531e457058c05e3fe8b7606ed08
Gitweb:     http://git.kernel.org/tip/fa0dacb0eec2f531e457058c05e3fe8b7606ed08
Author:     Gautham R Shenoy <ego@in.ibm.com>
AuthorDate: Tue, 14 Apr 2009 09:09:36 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 14 Apr 2009 14:01:00 +0200

sched: Avoid printing sched_group::__cpu_power for default case

Impact: reduce syslog clutter

Commit 46e0bb9c12f4 ("sched: Print sched_group::__cpu_power
in sched_domain_debug") produces a messy dmesg output while
attempting to print the sched_group::__cpu_power for each
group in the sched_domain hierarchy.

Fix this by avoid printing the __cpu_power for default cases.
(i.e, __cpu_power == SCHED_LOAD_SCALE).

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: a.p.zijlstra@chello.nl
LKML-Reference: <20090414033936.GA534@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/sched.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e90e70e..ebd574c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7367,8 +7367,9 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s (__cpu_power = %d)", str,
-						group->__cpu_power);
+		if (group->__cpu_power != SCHED_LOAD_SCALE)
+			printk(KERN_CONT " %s (__cpu_power = %d)", str,
+							group->__cpu_power);
 
 		group = group->next;
 	} while (group != sd->groups);

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* RE: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-14  3:39         ` Gautham R Shenoy
  2009-04-14 12:03           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
@ 2009-04-14 16:29           ` Luck, Tony
  2009-04-14 17:06             ` Gautham R Shenoy
  2009-04-14 18:42           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
  2009-04-16 22:48           ` tip-bot for Gautham R Shenoy
  3 siblings, 1 reply; 13+ messages in thread
From: Luck, Tony @ 2009-04-14 16:29 UTC (permalink / raw)
  To: ego@in.ibm.com, Ingo Molnar
  Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	a.p.zijlstra@chello.nl, tglx@linutronix.de,
	linux-tip-commits@vger.kernel.org

-               printk(KERN_CONT " %s (__cpu_power = %d)", str,
-                                               group->__cpu_power);
+               if (group->__cpu_power != SCHED_LOAD_SCALE)
+                       printk(KERN_CONT " %s (__cpu_power = %d)", str,
+                                                       group->__cpu_power);

Much quieter ... but perhaps a little too quiet?
Is this what you want?  Now the console output looks like this:

CPU0 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups:
CPU1 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups:
CPU2 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups:
 ...

instead of the original:

CPU0 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CPU1 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0
CPU2 attaching sched-domain:
 domain 0: span 0-15 level CPU
  groups: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1
 ...

Either we don't need the empty "groups:" line, or we should
still list the cpus in the group?  I'm not really sure what
information you are trying to convey here.

-Tony


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-14 16:29           ` [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug Luck, Tony
@ 2009-04-14 17:06             ` Gautham R Shenoy
  2009-04-14 17:18               ` Luck, Tony
  0 siblings, 1 reply; 13+ messages in thread
From: Gautham R Shenoy @ 2009-04-14 17:06 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Ingo Molnar, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	tglx@linutronix.de, linux-tip-commits@vger.kernel.org

On Tue, Apr 14, 2009 at 09:29:53AM -0700, Luck, Tony wrote:
> -               printk(KERN_CONT " %s (__cpu_power = %d)", str,
> -                                               group->__cpu_power);
> +               if (group->__cpu_power != SCHED_LOAD_SCALE)
> +                       printk(KERN_CONT " %s (__cpu_power = %d)", str,
> +                                                       group->__cpu_power);
> 
> Much quieter ... but perhaps a little too quiet?
> Is this what you want?  Now the console output looks like this:
> 
> CPU0 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups:
> CPU1 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups:
> CPU2 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups:
>  ...
> 
> instead of the original:
> 
> CPU0 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> CPU1 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0
> CPU2 attaching sched-domain:
>  domain 0: span 0-15 level CPU
>   groups: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1
>  ...
> 
> Either we don't need the empty "groups:" line, or we should
> still list the cpus in the group?  I'm not really sure what
> information you are trying to convey here.

We should be listing the cpus in the group. We should not be listing the
__cpu_power of the group, if the __cpu_power has the default value. In
the patch that I sent this morning, I made a mistake by making dependent
the printing of both cpus as well as __cpu_power, on the if
condition which checks if __cpu_power is default or not.

               if (group->__cpu_power != SCHED_LOAD_SCALE)
                       printk(KERN_CONT " %s (__cpu_power = %d)", str,
                                                       group->__cpu_power);

Unfortunately for me, it's not the first goof up I've been involved in
today. Please find the updated patch below.

---->
sched: Avoid printing sched_group::__cpu_power for default case.

From: Gautham R Shenoy <ego@in.ibm.com>

The following commit produces a messy dmesg output while attempting to print
the sched_group::__cpu_power for each group in the sched_domain hierarchy.

	commit 46e0bb9c12f4bab539736f1714cbf16600f681ec
	Author: Gautham R Shenoy <ego@in.ibm.com>
	Date:   Mon Mar 30 10:25:20 2009 +0530
	sched: Print sched_group::__cpu_power in sched_domain_debug

Fix this by avoid printing the __cpu_power for default cases.
(i.e, __cpu_power == SCHED_LOAD_SCALE).

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
---

 kernel/sched.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/kernel/sched.c b/kernel/sched.c
index 681d4ae..db2df70 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7467,7 +7467,9 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s (__cpu_power = %d)", str,
+		printk(KERN_CONT " %s", str);
+		if (group->__cpu_power != SCHED_LOAD_SCALE)
+			printk(KERN_CONT " (__cpu_power = %d)",
 						group->__cpu_power);
 
 		group = group->next;

-- 
Thanks and Regards
gautham

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* RE: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-14 17:06             ` Gautham R Shenoy
@ 2009-04-14 17:18               ` Luck, Tony
  2009-04-14 18:40                 ` Ingo Molnar
  0 siblings, 1 reply; 13+ messages in thread
From: Luck, Tony @ 2009-04-14 17:18 UTC (permalink / raw)
  To: ego@in.ibm.com
  Cc: Ingo Molnar, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	tglx@linutronix.de, linux-tip-commits@vger.kernel.org

-               printk(KERN_CONT " %s (__cpu_power = %d)", str,
+               printk(KERN_CONT " %s", str);
+               if (group->__cpu_power != SCHED_LOAD_SCALE)
+                       printk(KERN_CONT " (__cpu_power = %d)",
                                                group->__cpu_power);

That looks better.

Acked-by: Tony Luck <tony.luck@intel.com>

-Tony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug
  2009-04-14 17:18               ` Luck, Tony
@ 2009-04-14 18:40                 ` Ingo Molnar
  0 siblings, 0 replies; 13+ messages in thread
From: Ingo Molnar @ 2009-04-14 18:40 UTC (permalink / raw)
  To: Luck, Tony
  Cc: ego@in.ibm.com, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	tglx@linutronix.de, linux-tip-commits@vger.kernel.org


* Luck, Tony <tony.luck@intel.com> wrote:

> -               printk(KERN_CONT " %s (__cpu_power = %d)", str,
> +               printk(KERN_CONT " %s", str);
> +               if (group->__cpu_power != SCHED_LOAD_SCALE)
> +                       printk(KERN_CONT " (__cpu_power = %d)",
>                                                 group->__cpu_power);
> 
> That looks better.
> 
> Acked-by: Tony Luck <tony.luck@intel.com>

Thanks, picked up this variant!

	Ingo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case
  2009-04-14  3:39         ` Gautham R Shenoy
  2009-04-14 12:03           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
  2009-04-14 16:29           ` [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug Luck, Tony
@ 2009-04-14 18:42           ` tip-bot for Gautham R Shenoy
  2009-04-16 22:48           ` tip-bot for Gautham R Shenoy
  3 siblings, 0 replies; 13+ messages in thread
From: tip-bot for Gautham R Shenoy @ 2009-04-14 18:42 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, ego, hpa, mingo, tony.luck, tglx, mingo

Commit-ID:  728fc565bdfc98dc7086fdcccb3f1e1edf195b20
Gitweb:     http://git.kernel.org/tip/728fc565bdfc98dc7086fdcccb3f1e1edf195b20
Author:     Gautham R Shenoy <ego@in.ibm.com>
AuthorDate: Tue, 14 Apr 2009 09:09:36 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 14 Apr 2009 20:39:40 +0200

sched: Avoid printing sched_group::__cpu_power for default case

Impact: reduce syslog clutter

Commit 46e0bb9c12f4 ("sched: Print sched_group::__cpu_power
in sched_domain_debug") produces a messy dmesg output while
attempting to print the sched_group::__cpu_power for each
group in the sched_domain hierarchy.

Fix this by avoid printing the __cpu_power for default cases.
(i.e, __cpu_power == SCHED_LOAD_SCALE).

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Fixed-by: Tony Luck <tony.luck@intel.com>
Cc: a.p.zijlstra@chello.nl
LKML-Reference: <20090414033936.GA534@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/sched.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e90e70e..b902e58 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7367,8 +7367,12 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s (__cpu_power = %d)", str,
-						group->__cpu_power);
+
+		printk(KERN_CONT " %s", str);
+		if (group->__cpu_power != SCHED_LOAD_SCALE) {
+			printk(KERN_CONT " (__cpu_power = %d)",
+				group->__cpu_power);
+		}
 
 		group = group->next;
 	} while (group != sd->groups);

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case
  2009-04-14  3:39         ` Gautham R Shenoy
                             ` (2 preceding siblings ...)
  2009-04-14 18:42           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
@ 2009-04-16 22:48           ` tip-bot for Gautham R Shenoy
  3 siblings, 0 replies; 13+ messages in thread
From: tip-bot for Gautham R Shenoy @ 2009-04-16 22:48 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, ego, hpa, mingo, tony.luck, tglx, mingo

Commit-ID:  381512cf3d27f63f7a45b1bbe7d2d609c2ea3b74
Gitweb:     http://git.kernel.org/tip/381512cf3d27f63f7a45b1bbe7d2d609c2ea3b74
Author:     Gautham R Shenoy <ego@in.ibm.com>
AuthorDate: Tue, 14 Apr 2009 09:09:36 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 17 Apr 2009 00:46:05 +0200

sched: Avoid printing sched_group::__cpu_power for default case

Commit 46e0bb9c12f4 ("sched: Print sched_group::__cpu_power
in sched_domain_debug") produces a messy dmesg output while
attempting to print the sched_group::__cpu_power for each
group in the sched_domain hierarchy.

Fix this by avoid printing the __cpu_power for default cases.
(i.e, __cpu_power == SCHED_LOAD_SCALE).

[ Impact: reduce syslog clutter ]

Reported-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Fixed-by: Tony Luck <tony.luck@intel.com>
Cc: a.p.zijlstra@chello.nl
LKML-Reference: <20090414033936.GA534@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/sched.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e90e70e..b902e58 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7367,8 +7367,12 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
 		cpumask_or(groupmask, groupmask, sched_group_cpus(group));
 
 		cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group));
-		printk(KERN_CONT " %s (__cpu_power = %d)", str,
-						group->__cpu_power);
+
+		printk(KERN_CONT " %s", str);
+		if (group->__cpu_power != SCHED_LOAD_SCALE) {
+			printk(KERN_CONT " (__cpu_power = %d)",
+				group->__cpu_power);
+		}
 
 		group = group->next;
 	} while (group != sd->groups);

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-04-16 22:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30  4:55 [PATCH] sched: Print sched_group::__cpu_power in sched_domain_debug Gautham R Shenoy
2009-03-30  4:55 ` Gautham R Shenoy
2009-04-01 16:03   ` [tip:sched/urgent] " Gautham R Shenoy
2009-04-13 18:53     ` Tony Luck
2009-04-14  0:09       ` Ingo Molnar
2009-04-14  3:39         ` Gautham R Shenoy
2009-04-14 12:03           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
2009-04-14 16:29           ` [tip:sched/urgent] sched: Print sched_group::__cpu_power in sched_domain_debug Luck, Tony
2009-04-14 17:06             ` Gautham R Shenoy
2009-04-14 17:18               ` Luck, Tony
2009-04-14 18:40                 ` Ingo Molnar
2009-04-14 18:42           ` [tip:sched/urgent] sched: Avoid printing sched_group::__cpu_power for default case tip-bot for Gautham R Shenoy
2009-04-16 22:48           ` tip-bot for Gautham R Shenoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox