From: tip-bot for Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, venkatesh.pallipadi@intel.com,
mahesh@linux.vnet.ibm.com, suresh.b.siddha@intel.com,
tglx@linutronix.de, mingo@elte.hu, svaidy@linux.vnet.ibm.com
Subject: [tip:sched/core] sched: Don't export sched_mc_power_savings on multi-socket single core system
Date: Mon, 11 May 2009 22:27:30 GMT [thread overview]
Message-ID: <tip-2ff799d3cff1ecb274049378b28120ee5c1c5e5f@git.kernel.org> (raw)
In-Reply-To: <20090511143914.GB4853@dirshya.in.ibm.com>
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
prev parent reply other threads:[~2009-05-11 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-2ff799d3cff1ecb274049378b28120ee5c1c5e5f@git.kernel.org \
--to=svaidy@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.