From: Peter Zijlstra <peterz@infradead.org>
To: Mike Galbraith <bitbucket@online.de>
Cc: Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>, Len Brown <lenb@kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jeremy Eder <jeder@redhat.com>,
x86@kernel.org
Subject: Re: 50 Watt idle power regression bisected to Linux-3.10
Date: Wed, 11 Dec 2013 13:43:52 +0100 [thread overview]
Message-ID: <20131211124352.GB21999@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1386764955.12005.60.camel@marge.simpson.net>
On Wed, Dec 11, 2013 at 01:29:15PM +0100, Mike Galbraith wrote:
> On Wed, 2013-12-11 at 12:52 +0100, Peter Zijlstra wrote:
> > On Wed, Dec 11, 2013 at 12:38:39PM +0100, Borislav Petkov wrote:
> > > Right, if it turns out that this is really the case and that this
> > > erratum hasn't been fixed for models later than 29 - we'd need the
> > > additional model numbers to set X86_FEATURE_CLFLUSH_MONITOR correctly.
> >
> > You also need: https://lkml.org/lkml/2013/11/19/143
> >
> > Because obviously not all mwait idle loops check that cpu bit.
>
> I had tried that patch, to see if it would magically make the thing
> start working, nope. I had also tried...
> + if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
> + clflush((void *)¤t_thread_info()->flags);
Yeah, you need a bit extra to enable that feature bit for your CPU as
bpetkov said.
Something like the below.. someone needs to double check and possibly
add SNB/IVB EX parts if they're already available.
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index dc1ec0dff939..015642eed045 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -387,8 +387,15 @@ static void init_intel(struct cpuinfo_x86 *c)
set_cpu_cap(c, X86_FEATURE_PEBS);
}
- if (c->x86 == 6 && c->x86_model == 29 && cpu_has_clflush)
- set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR);
+ if (c->x86 == 6 && cpu_has_clflush) {
+ switch (c->x86_model) {
+ case 29: /* Core2 EX */
+ case 46: /* NHM EX */
+ case 47: /* WSM EX */
+ set_cpu_cap(c, X86_FEATURE_CLFLUSH_MONITOR);
+ break;
+ }
+ }
#ifdef CONFIG_X86_64
if (c->x86 == 15)
next prev parent reply other threads:[~2013-12-11 12:44 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 8:00 50 Watt idle power regression bisected to Linux-3.10 Len Brown
2013-12-07 8:39 ` Mike Galbraith
2013-12-07 16:01 ` Len Brown
2013-12-07 16:45 ` Len Brown
2013-12-07 19:17 ` Mike Galbraith
2013-12-10 11:41 ` Ingo Molnar
2013-12-07 12:54 ` Thomas Gleixner
2013-12-08 4:57 ` Mike Galbraith
2013-12-08 20:40 ` Len Brown
2013-12-09 3:16 ` Mike Galbraith
2013-12-10 5:17 ` Mike Galbraith
2013-12-10 11:45 ` Ingo Molnar
2013-12-10 14:29 ` Thomas Gleixner
2013-12-10 15:06 ` Ingo Molnar
2013-12-11 2:05 ` Thomas Gleixner
2013-12-11 3:21 ` Mike Galbraith
2013-12-11 11:28 ` Thomas Gleixner
2013-12-11 11:38 ` Borislav Petkov
2013-12-11 11:52 ` Peter Zijlstra
2013-12-11 12:29 ` Mike Galbraith
2013-12-11 12:43 ` Peter Zijlstra [this message]
2013-12-11 13:10 ` Mike Galbraith
2013-12-11 13:40 ` Borislav Petkov
2013-12-11 14:56 ` Ingo Molnar
2013-12-11 16:02 ` Borislav Petkov
2013-12-11 16:43 ` Peter Zijlstra
2013-12-11 17:50 ` Ingo Molnar
2013-12-11 23:08 ` H. Peter Anvin
2013-12-11 23:14 ` Borislav Petkov
2013-12-12 0:52 ` H. Peter Anvin
2013-12-12 4:25 ` Mike Galbraith
2013-12-12 4:49 ` H. Peter Anvin
2013-12-12 4:59 ` Mike Galbraith
2013-12-12 5:37 ` Mike Galbraith
2013-12-12 5:45 ` H. Peter Anvin
2013-12-12 5:57 ` Mike Galbraith
2013-12-12 6:05 ` Mike Galbraith
2013-12-12 7:57 ` H. Peter Anvin
2013-12-12 8:51 ` Peter Zijlstra
2013-12-12 13:28 ` Ingo Molnar
2013-12-12 15:06 ` H. Peter Anvin
2013-12-12 15:51 ` Peter Zijlstra
2013-12-11 14:42 ` Ingo Molnar
2013-12-11 15:02 ` Thomas Gleixner
2013-12-11 15:09 ` Ingo Molnar
2013-12-11 16:44 ` Peter Zijlstra
2013-12-11 17:48 ` Ingo Molnar
2013-12-11 16:44 ` Peter Zijlstra
2013-12-11 17:47 ` Ingo Molnar
2013-12-11 21:43 ` Len Brown
2013-12-11 22:22 ` Thomas Gleixner
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=20131211124352.GB21999@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bitbucket@online.de \
--cc=bp@alien8.de \
--cc=jeder@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox