[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-ca59809ff6d572ae58fc6bedf7500f5a60fdbd64@git.kernel.org>
Date: Fri, 29 Jan 2016 03:33:14 -0800
From: "tip-bot for Michael S. Tsirkin" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: brgerst@...il.com, mst@...hat.com,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, dave@...olabs.net, bp@...en8.de,
paulmck@...ux.vnet.ibm.com, hpa@...or.com, mingo@...nel.org,
luto@...capital.net, dvlasenk@...hat.com, oleg@...hat.com,
bitbucket@...ine.de, len.brown@...el.com,
torvalds@...ux-foundation.org, peterz@...radead.org,
tglx@...utronix.de, akpm@...ux-foundation.org, luto@...nel.org,
dbueso@...e.de
Subject: [tip:locking/core] locking/x86: Use mb() around clflush()
Commit-ID: ca59809ff6d572ae58fc6bedf7500f5a60fdbd64
Gitweb: http://git.kernel.org/tip/ca59809ff6d572ae58fc6bedf7500f5a60fdbd64
Author: Michael S. Tsirkin <mst@...hat.com>
AuthorDate: Thu, 28 Jan 2016 19:02:51 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 29 Jan 2016 09:40:10 +0100
locking/x86: Use mb() around clflush()
The following commit:
f8e617f4582995f ("sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs")
adds memory barriers around clflush(), but this seems wrong for UP since
barrier() has no effect on clflush(). We really want MFENCE, so switch
to mb() instead.
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Davidlohr Bueso <dave@...olabs.net>
Cc: Davidlohr Bueso <dbueso@...e.de>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Len Brown <len.brown@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <bitbucket@...ine.de>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: virtualization <virtualization@...ts.linux-foundation.org>
Link: http://lkml.kernel.org/r/1453921746-16178-5-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 9f7c21c..9decee2 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -418,9 +418,9 @@ static void mwait_idle(void)
if (!current_set_polling_and_test()) {
trace_cpu_idle_rcuidle(1, smp_processor_id());
if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
- smp_mb(); /* quirk */
+ mb(); /* quirk */
clflush((void *)¤t_thread_info()->flags);
- smp_mb(); /* quirk */
+ mb(); /* quirk */
}
__monitor((void *)¤t_thread_info()->flags, 0, 0);
Powered by blists - more mailing lists