[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-bf0d31c05411f030e7df9f98b5be4d0c6fd5cd39@git.kernel.org>
Date: Wed, 16 Nov 2016 04:09:28 -0800
From: tip-bot for Christian Borntraeger <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux@...linux.org.uk, npiggin@...il.com, mingo@...nel.org,
linux-kernel@...r.kernel.org, schwidefsky@...ibm.com,
torvalds@...ux-foundation.org, heiko.carstens@...ibm.com,
tglx@...utronix.de, borntraeger@...ibm.com, will.deacon@....com,
catalin.marinas@....com, noamc@...hip.com, hpa@...or.com,
peterz@...radead.org
Subject: [tip:locking/core] locking/core, stop_machine: Yield the CPU during
stop machine()
Commit-ID: bf0d31c05411f030e7df9f98b5be4d0c6fd5cd39
Gitweb: http://git.kernel.org/tip/bf0d31c05411f030e7df9f98b5be4d0c6fd5cd39
Author: Christian Borntraeger <borntraeger@...ibm.com>
AuthorDate: Tue, 25 Oct 2016 11:03:12 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 16 Nov 2016 10:15:09 +0100
locking/core, stop_machine: Yield the CPU during stop machine()
Some time ago the following commit:
57f2ffe14fd125c2 ("s390: remove diag 44 calls from cpu_relax()")
... stopped cpu_relax() on s390 yielding to the hypervisor.
As it turns out this made stop_machine() run really slow on virtualized
overcommited systems. For example the kprobes test during bootup took
several seconds instead of just running unnoticed with large guests.
Therefore, yielding was reintroduced with commit:
4d92f50249eb ("s390: reintroduce diag 44 calls for cpu_relax()")
... but in fact the stop machine code seems to be the only place where
this yielding was really necessary. This place is probably the most
important one as it makes all but one guest CPUs wait for one guest CPU.
As we now have cpu_relax_yield(), we can use this in multi_cpu_stop().
For now lets only add it here. We can add it later in other places
when necessary.
Signed-off-by: Christian Borntraeger <borntraeger@...ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Nicholas Piggin <npiggin@...il.com>
Cc: Noam Camus <noamc@...hip.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Russell King <linux@...linux.org.uk>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Will Deacon <will.deacon@....com>
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: virtualization@...ts.linux-foundation.org
Cc: xen-devel@...ts.xenproject.org
Link: http://lkml.kernel.org/r/1477386195-32736-3-git-send-email-borntraeger@de.ibm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/stop_machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index ec9ab2f..1eb8266 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -194,7 +194,7 @@ static int multi_cpu_stop(void *data)
/* Simple state machine */
do {
/* Chill out and ensure we re-read multi_stop_state. */
- cpu_relax();
+ cpu_relax_yield();
if (msdata->state != curstate) {
curstate = msdata->state;
switch (curstate) {
Powered by blists - more mailing lists