From: Mike Galbraith <bitbucket@online.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Len Brown <lenb@kernel.org>,
x86@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>,
Ian Malone <ibmalone@gmail.com>, Josh Boyer <jwboyer@redhat.com>,
stable@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH REGRESSION FIX] x86 idle: restore mwait_idle()
Date: Sat, 18 Jan 2014 10:33:53 +0100 [thread overview]
Message-ID: <1390037633.5676.3.camel@marge.simpson.net> (raw)
In-Reply-To: <1389932442.5449.4.camel@marge.simpson.net>
On Fri, 2014-01-17 at 05:20 +0100, Mike Galbraith wrote:
> taskset 0xc pipe-test 1
>
> 3.8.13 3.397977 usecs/loop -- avg 3.400336 588.2 KHz
> master+ 4.798547 usecs/loop -- avg 4.791692 417.4 KHz
Bah, those are apple/grape, these are apple/apple.
idle: kill unnecessary mwait_idle() resched IPIs
Set/clear polling instead.
Q6600, pipe-test scheduling cross core:
3.8.13 487.2 KHz 1.000
3.13.0-master 415.5 KHz .852
3.13.0-master+ 415.2 KHz .852 + restore mwait_idle
3.13.0-master++ 488.5 KHz 1.002 + restore mwait_idle + IPI fix
Signed-off-by: Mike Galbraith <bitbucket@online.de>
---
arch/x86/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -427,18 +427,18 @@ static int prefer_mwait_c1_over_halt(con
static void mwait_idle(void)
{
- if (!need_resched()) {
+ if (!current_set_polling_and_test()) {
if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
clflush((void *)¤t_thread_info()->flags);
__monitor((void *)¤t_thread_info()->flags, 0, 0);
- smp_mb();
if (!need_resched())
__sti_mwait(0, 0);
else
local_irq_enable();
} else
local_irq_enable();
+ __current_clr_polling();
}
void select_idle_routine(const struct cpuinfo_x86 *c)
next prev parent reply other threads:[~2014-01-18 9:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1ae2a8af42281d6b9888ac8c76bab7bd2f431d44.1389763084.git.len.brown@intel.com>
2014-01-15 5:37 ` [PATCH REGRESSION FIX] x86 idle: restore mwait_idle() Len Brown
2014-01-15 5:37 ` Len Brown
2014-01-15 9:28 ` Mike Galbraith
2014-01-16 22:00 ` Andy Lutomirski
2014-01-17 4:20 ` Mike Galbraith
2014-01-18 9:33 ` Mike Galbraith [this message]
2014-01-18 16:14 ` Mike Galbraith
2015-03-14 23:44 ` Ian Malone
2015-03-15 4:53 ` Mike Galbraith
2015-03-16 23:32 ` Ian Malone
2015-03-17 8:22 ` Ingo Molnar
2015-03-17 8:33 ` Mike Galbraith
2015-03-18 1:55 ` Ian Malone
2015-03-16 12:11 ` [tip:sched/core] sched/idle/x86: Optimize unnecessary mwait_idle( ) resched IPIs tip-bot for Mike Galbraith
2015-03-16 12:11 ` [tip:sched/core] sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve power savings and to improve performance tip-bot for Len Brown
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=1390037633.5676.3.camel@marge.simpson.net \
--to=bitbucket@online.de \
--cc=ibmalone@gmail.com \
--cc=jwboyer@redhat.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--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 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.