All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][REPOST] Don't export sched_mc_power_savings on multi-socket single core system
@ 2009-05-11 12:30 Mahesh Jagannath Salgaonkar
  2009-05-11 12:35 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2009-05-11 12:30 UTC (permalink / raw)
  To: Linux Kernel, Suresh B Siddha, Ingo Molnar, Venkatesh Pallipadi
  Cc: svaidy, Peter Zijlstra, mahesh

My previous post got lost somewhere in lkml list. Hence reposting this 
patch again.

Fix to prevent sched_mc_power_saving from being exported through sysfs
for multi-scoket single core system. Max cores should be always greater than
one (1). My earlier patch that introduced fix for not exporting
'sched_mc_power_saving' on laptops  broke it on multi-socket single core
system. This fix addresses issue on both laptop and multi-socket single 
core system.
Below are the Test results:

1. Single socket - multi-core
       Before Patch: Does not export 'sched_mc_power_saving'
       After Patch: Does not export 'sched_mc_power_saving'
       Result: Pass

2. Multi Socket - single core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: Does not export 'sched_mc_power_saving'
      Result: Pass

3. Multi Socket - Multi core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: exports 'sched_mc_power_saving'


Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>

Index: linux-2.6/arch/x86/include/asm/topology.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/topology.h
+++ linux-2.6/arch/x86/include/asm/topology.h
@@ -203,7 +203,8 @@ struct pci_bus;
  void x86_pci_root_bus_res_quirks(struct pci_bus *b);

  #ifdef CONFIG_SMP
-#define mc_capable()	(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
+#define mc_capable()	(boot_cpu_data.x86_max_cores > 1) && \
+			(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
  #define smt_capable()			(smp_num_siblings > 1)
  #endif

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

* Re: [PATCH][REPOST] Don't export sched_mc_power_savings on multi-socket single core system
  2009-05-11 12:30 [PATCH][REPOST] Don't export sched_mc_power_savings on multi-socket single core system Mahesh Jagannath Salgaonkar
@ 2009-05-11 12:35 ` Ingo Molnar
  2009-05-11 14:39   ` [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket " Vaidyanathan Srinivasan
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2009-05-11 12:35 UTC (permalink / raw)
  To: Mahesh Jagannath Salgaonkar
  Cc: Linux Kernel, Suresh B Siddha, Venkatesh Pallipadi, svaidy,
	Peter Zijlstra


* Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:

> My previous post got lost somewhere in lkml list. Hence reposting 
> this patch again.

no, it did not get lost, i gave you the feedback below more than a 
month ago. FYI, this resubmission has the same corrupted-patch 
problem.

	Ingo

----- Forwarded message from Ingo Molnar <mingo@elte.hu> -----

Date: Wed, 8 Apr 2009 13:42:03 +0200
From: Ingo Molnar <mingo@elte.hu>
To: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
Subject: Re: [PATCH] Don't export sched_mc_power_savings on multi-socket
	single core system
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Suresh B Siddha <suresh.b.siddha@intel.com>,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	svaidy@linux.vnet.ibm.com, balbir@linux.vnet.ibm.com,
	dipankar@in.ibm.com, Peter Zijlstra <a.p.zijlstra@chello.nl>


* Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:

> Fix to prevent sched_mc_power_saving from being exported through 
> sysfs for multi-scoket single core system. Max cores should be 
> always greater than one (1). My earlier patch that introduced fix 
> for not exporting 'sched_mc_power_saving' on laptops broke it on 
> multi-socket single core system. This fix addresses issue on both 
> laptop and multi-socket single core system. Below are the Test 
> results:

> +#define mc_capable()   (boot_cpu_data.x86_max_cores > 1) && \
> +                       (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
> #define smt_capable()                  (smp_num_siblings > 1)

patch looks good but is whitespace damaged (all tabs were converted 
to spaces). See Documentation/email-clients.txt about how to set up 
your client.

	Ingo

----- End forwarded message -----

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

* Re: [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket single core system
  2009-05-11 12:35 ` Ingo Molnar
@ 2009-05-11 14:39   ` Vaidyanathan Srinivasan
  2009-05-11 15:09     ` [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket " tip-bot for Vaidyanathan Srinivasan
  2009-05-11 22:27     ` tip-bot for Vaidyanathan Srinivasan
  0 siblings, 2 replies; 5+ messages in thread
From: Vaidyanathan Srinivasan @ 2009-05-11 14:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Mahesh Jagannath Salgaonkar, Linux Kernel, Suresh B Siddha,
	Venkatesh Pallipadi, Peter Zijlstra

* Ingo Molnar <mingo@elte.hu> [2009-05-11 14:35:29]:

> 
> * Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
> 
> > My previous post got lost somewhere in lkml list. Hence reposting 
> > this patch again.
> 
> no, it did not get lost, i gave you the feedback below more than a 
> month ago. FYI, this resubmission has the same corrupted-patch 
> problem.

Hi Ingo,

My copy of the [REPOST] seem to have tabs correct.  Anyways I have
added an extra parentheses also in the #define. Please check and
apply.

Thanks,
Vaidy

Don't export sched_mc_power_savings on multi-socket single core system

Fix to prevent sched_mc_power_saving from being exported through sysfs
for multi-scoket single core system. Max cores should be always greater than
one (1). My earlier patch that introduced fix for not exporting
'sched_mc_power_saving' on laptops  broke it on multi-socket single core
system. This fix addresses issue on both laptop and multi-socket single
core system.
Below are the Test results:

1. Single socket - multi-core
       Before Patch: Does not export 'sched_mc_power_saving'
       After Patch: Does not export 'sched_mc_power_saving'
       Result: Pass

2. Multi Socket - single core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: Does not export 'sched_mc_power_saving'
      Result: Pass

3. Multi Socket - Multi core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: exports 'sched_mc_power_saving'


Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---

 arch/x86/include/asm/topology.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index f44b49a..066ef59 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -203,7 +203,8 @@ struct pci_bus;
 void x86_pci_root_bus_res_quirks(struct pci_bus *b);
 
 #ifdef CONFIG_SMP
-#define mc_capable()	(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
+#define mc_capable()	((boot_cpu_data.x86_max_cores > 1) && \
+			(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids))
 #define smt_capable()			(smp_num_siblings > 1)
 #endif
 

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

* [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket single core system
  2009-05-11 14:39   ` [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket " Vaidyanathan Srinivasan
@ 2009-05-11 15:09     ` tip-bot for Vaidyanathan Srinivasan
  2009-05-11 22:27     ` tip-bot for Vaidyanathan Srinivasan
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Vaidyanathan Srinivasan @ 2009-05-11 15:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, venkatesh.pallipadi,
	mahesh, suresh.b.siddha, tglx, mingo, svaidy

Commit-ID:  33faf60cb97fee37b0e60a68c171f9099c576dec
Gitweb:     http://git.kernel.org/tip/33faf60cb97fee37b0e60a68c171f9099c576dec
Author:     Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
AuthorDate: Mon, 11 May 2009 20:09:14 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 11 May 2009 17:05:57 +0200

sched: Don't export sched_mc_power_savings on multi-socket single core system

Fix to prevent sched_mc_power_saving from being exported through sysfs
for multi-scoket single core system. Max cores should be always greater than
one (1). My earlier patch that introduced fix for not exporting
'sched_mc_power_saving' on laptops  broke it on multi-socket single core
system. This fix addresses issue on both laptop and multi-socket single
core system.
Below are the Test results:

1. Single socket - multi-core
       Before Patch: Does not export 'sched_mc_power_saving'
       After Patch: Does not export 'sched_mc_power_saving'
       Result: Pass

2. Multi Socket - single core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: Does not export 'sched_mc_power_saving'
      Result: Pass

3. Multi Socket - Multi core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: exports 'sched_mc_power_saving'

[ Impact: make the sched_mc_power_saving control available more consistently ]

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Suresh B Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090511143914.GB4853@dirshya.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/include/asm/topology.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index f44b49a..066ef59 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -203,7 +203,8 @@ struct pci_bus;
 void x86_pci_root_bus_res_quirks(struct pci_bus *b);
 
 #ifdef CONFIG_SMP
-#define mc_capable()	(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
+#define mc_capable()	((boot_cpu_data.x86_max_cores > 1) && \
+			(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids))
 #define smt_capable()			(smp_num_siblings > 1)
 #endif
 

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

* [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket single core system
  2009-05-11 14:39   ` [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket " Vaidyanathan Srinivasan
  2009-05-11 15:09     ` [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket " tip-bot for Vaidyanathan Srinivasan
@ 2009-05-11 22:27     ` tip-bot for Vaidyanathan Srinivasan
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Vaidyanathan Srinivasan @ 2009-05-11 22:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, venkatesh.pallipadi,
	mahesh, suresh.b.siddha, tglx, mingo, svaidy

Commit-ID:  2ff799d3cff1ecb274049378b28120ee5c1c5e5f
Gitweb:     http://git.kernel.org/tip/2ff799d3cff1ecb274049378b28120ee5c1c5e5f
Author:     Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
AuthorDate: Mon, 11 May 2009 20:09:14 +0530
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 11 May 2009 23:57:56 +0200

sched: Don't export sched_mc_power_savings on multi-socket single core system

Fix to prevent sched_mc_power_saving from being exported through sysfs
for multi-scoket single core system. Max cores should be always greater than
one (1). My earlier patch that introduced fix for not exporting
'sched_mc_power_saving' on laptops  broke it on multi-socket single core
system. This fix addresses issue on both laptop and multi-socket single
core system.
Below are the Test results:

1. Single socket - multi-core
       Before Patch: Does not export 'sched_mc_power_saving'
       After Patch: Does not export 'sched_mc_power_saving'
       Result: Pass

2. Multi Socket - single core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: Does not export 'sched_mc_power_saving'
      Result: Pass

3. Multi Socket - Multi core
      Before Patch: exports 'sched_mc_power_saving'
      After Patch: exports 'sched_mc_power_saving'

[ Impact: make the sched_mc_power_saving control available more consistently ]

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Suresh B Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090511143914.GB4853@dirshya.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/include/asm/topology.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index f44b49a..066ef59 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -203,7 +203,8 @@ struct pci_bus;
 void x86_pci_root_bus_res_quirks(struct pci_bus *b);
 
 #ifdef CONFIG_SMP
-#define mc_capable()	(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
+#define mc_capable()	((boot_cpu_data.x86_max_cores > 1) && \
+			(cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids))
 #define smt_capable()			(smp_num_siblings > 1)
 #endif
 

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

end of thread, other threads:[~2009-05-11 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 12:30 [PATCH][REPOST] Don't export sched_mc_power_savings on multi-socket single core system Mahesh Jagannath Salgaonkar
2009-05-11 12:35 ` Ingo Molnar
2009-05-11 14:39   ` [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket " Vaidyanathan Srinivasan
2009-05-11 15:09     ` [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket " tip-bot for Vaidyanathan Srinivasan
2009-05-11 22:27     ` tip-bot for Vaidyanathan Srinivasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.