|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/mwait-idle: disable Baytrail Core and Module C6 auto-demotion
commit 249735c48fb24cff44957f7d0bcb6cbf1f29fc4c
Author: Len Brown <len.brown@xxxxxxxxx>
AuthorDate: Tue Sep 9 18:10:21 2014 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Sep 9 18:10:21 2014 +0200
x86/mwait-idle: disable Baytrail Core and Module C6 auto-demotion
Power efficiency improves on Baytrail (Intel Atom Processor E3000)
when Linux disables C6 auto-demotion.
Based on work by Srinidhi Kasagar <srinidhi.kasagar@xxxxxxxxx>.
Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
Do the MSR writes on all CPUs rather than just the current one.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/cpu/mwait-idle.c | 11 +++++++++++
xen/include/asm-x86/msr-index.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c
index c2c8889..a4a779b 100644
--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -88,6 +88,7 @@ struct idle_cpu {
* Indicate which enable bits to clear here.
*/
unsigned long auto_demotion_disable_flags;
+ bool_t byt_auto_demotion_disable_flag;
bool_t disable_promotion_to_c1e;
};
@@ -537,6 +538,12 @@ static void auto_demotion_disable(void *dummy)
wrmsrl(MSR_NHM_SNB_PKG_CST_CFG_CTL, msr_bits);
}
+static void byt_auto_demotion_disable(void *dummy)
+{
+ wrmsrl(MSR_CC6_DEMOTION_POLICY_CONFIG, 0);
+ wrmsrl(MSR_MC6_DEMOTION_POLICY_CONFIG, 0);
+}
+
static void c1e_promotion_disable(void *dummy)
{
u64 msr_bits;
@@ -569,6 +576,7 @@ static const struct idle_cpu idle_cpu_snb = {
static const struct idle_cpu idle_cpu_byt = {
.state_table = byt_cstates,
.disable_promotion_to_c1e = 1,
+ .byt_auto_demotion_disable_flag = 1,
};
static const struct idle_cpu idle_cpu_ivb = {
@@ -767,6 +775,9 @@ static int mwait_idle_cpu_init(struct notifier_block *nfb,
if (icpu->auto_demotion_disable_flags)
on_selected_cpus(cpumask_of(cpu), auto_demotion_disable, NULL,
1);
+ if (icpu->byt_auto_demotion_disable_flag)
+ on_selected_cpus(cpumask_of(cpu), byt_auto_demotion_disable,
NULL, 1);
+
if (icpu->disable_promotion_to_c1e)
on_selected_cpus(cpumask_of(cpu), c1e_promotion_disable, NULL,
1);
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 2056501..542222e 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -483,4 +483,7 @@
#define _MSR_MISC_FEATURES_CPUID_FAULTING 0
#define MSR_MISC_FEATURES_CPUID_FAULTING (1ULL <<
_MSR_MISC_FEATURES_CPUID_FAULTING)
+#define MSR_CC6_DEMOTION_POLICY_CONFIG 0x00000668
+#define MSR_MC6_DEMOTION_POLICY_CONFIG 0x00000669
+
#endif /* __ASM_MSR_INDEX_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |