]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2015 20:15:29 +0000 (22:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2015 20:15:29 +0000 (22:15 +0200)
added patches:

queue-3.14/sched-idle-x86-optimize-unnecessary-mwait_idle-resched-ipis.patch [deleted file]
queue-3.14/sched-idle-x86-restore-mwait_idle-to-fix-boot-hangs-to-improve-power-savings-and-to-improve-performance.patch
queue-3.14/series

diff --git a/queue-3.14/sched-idle-x86-optimize-unnecessary-mwait_idle-resched-ipis.patch b/queue-3.14/sched-idle-x86-optimize-unnecessary-mwait_idle-resched-ipis.patch
deleted file mode 100644 (file)
index 0b177f2..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-From f8e617f4582995f7c25ef25b4167213120ad122b Mon Sep 17 00:00:00 2001
-From: Mike Galbraith <bitbucket@online.de>
-Date: Sat, 18 Jan 2014 17:14:44 +0100
-Subject: sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs
-
-From: Mike Galbraith <bitbucket@online.de>
-
-commit f8e617f4582995f7c25ef25b4167213120ad122b upstream.
-
-To fully take advantage of MWAIT, apparently the CLFLUSH instruction needs
-another quirk on certain CPUs: proper barriers around it on certain machines.
-
-On a Q6600 SMP system, pipe-test scheduling performance, cross core,
-improves significantly:
-
-  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
-
-Since X86_BUG_CLFLUSH_MONITOR is already a quirk, don't create a separate
-quirk for the extra smp_mb()s.
-
-Signed-off-by: Mike Galbraith <bitbucket@online.de>
-Cc: Borislav Petkov <bp@alien8.de>
-Cc: H. Peter Anvin <hpa@zytor.com>
-Cc: Ian Malone <ibmalone@gmail.com>
-Cc: Josh Boyer <jwboyer@redhat.com>
-Cc: Len Brown <len.brown@intel.com>
-Cc: Len Brown <lenb@kernel.org>
-Cc: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Mike Galbraith <efault@gmx.de>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Link: http://lkml.kernel.org/r/1390061684.5566.4.camel@marge.simpson.net
-[ Ported to recent kernel, added comments about the quirk. ]
-Signed-off-by: Ingo Molnar <mingo@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- arch/x86/kernel/process.c |   12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
---- a/arch/x86/kernel/process.c
-+++ b/arch/x86/kernel/process.c
-@@ -428,18 +428,22 @@ static int prefer_mwait_c1_over_halt(con
- static void mwait_idle(void)
- {
--      if (!need_resched()) {
--              if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR))
-+      if (!current_set_polling_and_test()) {
-+              if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
-+                      smp_mb(); /* quirk */
-                       clflush((void *)&current_thread_info()->flags);
-+                      smp_mb(); /* quirk */
-+              }
-               __monitor((void *)&current_thread_info()->flags, 0, 0);
--              smp_mb();
-               if (!need_resched())
-                       __sti_mwait(0, 0);
-               else
-                       local_irq_enable();
--      } else
-+      } else {
-               local_irq_enable();
-+      }
-+      __current_clr_polling();
- }
- void select_idle_routine(const struct cpuinfo_x86 *c)
index 33fb6dd55095033908fd812f42ef7e504932583b..4f3e0985136d2929f8841447a043562df8266130 100644 (file)
@@ -45,6 +45,7 @@ Maintainer notes:
 Tested-by: Mike Galbraith <bitbucket@online.de>
 Signed-off-by: Len Brown <len.brown@intel.com>
 Acked-by: Mike Galbraith <bitbucket@online.de>
+Cc: <stable@vger.kernel.org> # 3.9+
 Cc: Borislav Petkov <bp@alien8.de>
 Cc: H. Peter Anvin <hpa@zytor.com>
 Cc: Ian Malone <ibmalone@gmail.com>
@@ -55,13 +56,15 @@ Cc: Peter Zijlstra <peterz@infradead.org>
 Cc: Thomas Gleixner <tglx@linutronix.de>
 Link: http://lkml.kernel.org/r/345254a551eb5a6a866e048d7ab570fd2193aca4.1389763084.git.len.brown@intel.com
 [ Ported to recent kernels. ]
+[ Mike: 3.10 backport ]
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Mike Galbraith <efault@gmx.de>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 ---
- arch/x86/include/asm/mwait.h |    8 +++++++
- arch/x86/kernel/process.c    |   47 +++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 55 insertions(+)
+ arch/x86/include/asm/mwait.h |    8 ++++++
+ arch/x86/kernel/process.c    |   50 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+)
 
 --- a/arch/x86/include/asm/mwait.h
 +++ b/arch/x86/include/asm/mwait.h
@@ -82,15 +85,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
   * which can obviate IPI to trigger checking of need_resched.
 --- a/arch/x86/kernel/process.c
 +++ b/arch/x86/kernel/process.c
-@@ -24,6 +24,7 @@
- #include <asm/syscalls.h>
- #include <asm/idle.h>
- #include <asm/uaccess.h>
-+#include <asm/mwait.h>
- #include <asm/i387.h>
+@@ -28,6 +28,7 @@
  #include <asm/fpu-internal.h>
  #include <asm/debugreg.h>
-@@ -398,6 +399,49 @@ static void amd_e400_idle(void)
+ #include <asm/nmi.h>
++#include <asm/mwait.h>
+ /*
+  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
+@@ -398,6 +399,52 @@ static void amd_e400_idle(void)
                default_idle();
  }
  
@@ -123,24 +126,27 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +
 +static void mwait_idle(void)
 +{
-+      if (!need_resched()) {
-+              if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR))
++      if (!current_set_polling_and_test()) {
++              if (static_cpu_has(X86_FEATURE_CLFLUSH_MONITOR)) {
++                      mb();
 +                      clflush((void *)&current_thread_info()->flags);
++                      mb();
++              }
 +
 +              __monitor((void *)&current_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)
  {
  #ifdef CONFIG_SMP
-@@ -411,6 +455,9 @@ void select_idle_routine(const struct cp
+@@ -411,6 +458,9 @@ void select_idle_routine(const struct cp
                /* E400: APIC timer interrupt does not wake up CPU from C1e */
                pr_info("using AMD E400 aware idle routine\n");
                x86_idle = amd_e400_idle;
index 971804c62692f41a8887fbd152d896ade8285656..70e035749e7e348e7881ec594e4bed33f359aaa7 100644 (file)
@@ -3,9 +3,8 @@ tcp-fix-possible-deadlock-in-tcp_send_fin.patch
 tcp-avoid-looping-in-tcp_send_fin.patch
 net-do-not-deplete-pfmemalloc-reserve.patch
 net-fix-crash-in-build_skb.patch
-sched-idle-x86-restore-mwait_idle-to-fix-boot-hangs-to-improve-power-savings-and-to-improve-performance.patch
-sched-idle-x86-optimize-unnecessary-mwait_idle-resched-ipis.patch
 btrfs-fix-log-tree-corruption-when-fs-mounted-with-o-discard.patch
 btrfs-don-t-accept-bare-namespace-as-a-valid-xattr.patch
 btrfs-fix-inode-eviction-infinite-loop-after-cloning-into-it.patch
 btrfs-fix-inode-eviction-infinite-loop-after-extent_same-ioctl.patch
+sched-idle-x86-restore-mwait_idle-to-fix-boot-hangs-to-improve-power-savings-and-to-improve-performance.patch