]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Oct 2015 15:09:26 +0000 (08:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Oct 2015 15:09:26 +0000 (08:09 -0700)
added patches:
sched-preempt-powerpc-kvm-use-need_resched-instead-of-should_resched.patch

queue-4.2/sched-preempt-powerpc-kvm-use-need_resched-instead-of-should_resched.patch [new file with mode: 0644]
queue-4.2/series

diff --git a/queue-4.2/sched-preempt-powerpc-kvm-use-need_resched-instead-of-should_resched.patch b/queue-4.2/sched-preempt-powerpc-kvm-use-need_resched-instead-of-should_resched.patch
new file mode 100644 (file)
index 0000000..99eab63
--- /dev/null
@@ -0,0 +1,42 @@
+From c56dadf39761a6157239cac39e3988998c994f98 Mon Sep 17 00:00:00 2001
+From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Date: Wed, 15 Jul 2015 12:52:03 +0300
+Subject: sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()
+
+From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+
+commit c56dadf39761a6157239cac39e3988998c994f98 upstream.
+
+Function should_resched() is equal to (!preempt_count() && need_resched()).
+In preemptive kernel preempt_count here is non-zero because of vc->lock.
+
+Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Alexander Graf <agraf@suse.de>
+Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Cc: David Vrabel <david.vrabel@citrix.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Mike Galbraith <efault@gmx.de>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/20150715095203.12246.72922.stgit@buzz
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/kvm/book3s_hv.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/kvm/book3s_hv.c
++++ b/arch/powerpc/kvm/book3s_hv.c
+@@ -2178,7 +2178,7 @@ static int kvmppc_run_vcpu(struct kvm_ru
+               vc->runner = vcpu;
+               if (n_ceded == vc->n_runnable) {
+                       kvmppc_vcore_blocked(vc);
+-              } else if (should_resched()) {
++              } else if (need_resched()) {
+                       vc->vcore_state = VCORE_PREEMPT;
+                       /* Let something else run */
+                       cond_resched_lock(&vc->lock);
index ab5c350ebcf3ac1855981b9b7af60c32636b1162..1472a6fcdb2d51764b927a37a94bcbf957e2efce 100644 (file)
@@ -257,3 +257,4 @@ blk-mq-avoid-setting-hctx-tags-cpumask-before-allocation.patch
 sched-preempt-fix-cond_resched_lock-and-cond_resched_softirq.patch
 3w-9xxx-don-t-unmap-bounce-buffered-commands.patch
 sched-preempt-xen-use-need_resched-instead-of-should_resched.patch
+sched-preempt-powerpc-kvm-use-need_resched-instead-of-should_resched.patch