Don't export sched_mc_power_savings on multi-socket single core system
PATCH 1/1 Don't export sched_mc_power_savings on multi-socket single core system
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'
arch/x86/include/asm/topology.h +2 -1
@@ -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
Quoted 2 lines · Mahesh Jagannath Salgaonkar
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 <[email protected]> -----
Date: Wed, 8 Apr 2009 13:42:03 +0200
From: Ingo Molnar <[email protected]>
To: Mahesh Jagannath Salgaonkar <[email protected]>
Subject: Re: [PATCH] Don't export sched_mc_power_savings on multi-socket
single core system
Cc: Linux Kernel <[email protected]>,
Suresh B Siddha <[email protected]>, Venkatesh Pallipadi <[email protected]>, [email protected], [email protected], [email protected], Peter Zijlstra <[email protected]>
Quoted 11 lines · Mahesh Jagannath Salgaonkar
Fix to prevent
sched_mc_power_savingfrom 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:arch/x86/include/asm/topology.h +2
-0+#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 -----
Re: [PATCH][REPOST] Don't export sched_mc_power_savings onmulti-socket single core system
Quoted 9 lines · Ingo Molnar
Quoted 2 lines · Mahesh Jagannath Salgaonkar
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'
---
arch/x86/include/asm/topology.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/include/asm/topology.h +2 -1
@@ -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
[tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket single core system
Commit-ID: 33faf60cb97fee37b0e60a68c171f9099c576dec Gitweb: http://git.kernel.org/tip/33faf60cb97fee37b0e60a68c171f9099c576dec Author: Vaidyanathan Srinivasan <[email protected]> AuthorDate: Mon, 11 May 2009 20:09:14 +0530 Committer: Ingo Molnar <[email protected]> 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 ]
LKML-Reference: <[email protected]>
--- arch/x86/include/asm/topology.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/include/asm/topology.h +2 -1
@@ -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
[tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket single core system
In reply to Vaidyanathan SrinivasanCommit-ID: 2ff799d3cff1ecb274049378b28120ee5c1c5e5f Gitweb: http://git.kernel.org/tip/2ff799d3cff1ecb274049378b28120ee5c1c5e5f Author: Vaidyanathan Srinivasan <[email protected]> AuthorDate: Mon, 11 May 2009 20:09:14 +0530 Committer: Ingo Molnar <[email protected]> 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 ]
LKML-Reference: <[email protected]>
--- arch/x86/include/asm/topology.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/include/asm/topology.h +2 -1
@@ -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