Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1505817

[PATCH 2/5] stop_machine: yield CPU during stop machine

From Christian Borntraeger <borntraeger@de.ibm.com>
Newsgroups linux.kernel
Subject [PATCH 2/5] stop_machine: yield CPU during stop machine
Date 2016-10-21 14:10 +0200
Message-ID <suGO5-5kf-3@gated-at.bofh.it> (permalink)
References <suGEq-509-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


stop_machine can take a very long time if the hypervisor does
overcommitment for guest CPUs. When waiting for "the one", lets
give up our CPU by using the new cpu_relax_yield.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 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) {
-- 
2.5.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/5] stop_machine: yield CPU during stop machine Christian Borntraeger <borntraeger@de.ibm.com> - 2016-10-21 14:10 +0200
  Re: [PATCH 2/5] stop_machine: yield CPU during stop machine Peter Zijlstra <peterz@infradead.org> - 2016-10-21 14:10 +0200
    Re: [PATCH 2/5] stop_machine: yield CPU during stop machine Juergen Gross <lists@pfupf.net> - 2016-10-21 14:50 +0200
    Re: [PATCH 2/5] stop_machine: yield CPU during stop machine Nicholas Piggin <npiggin@gmail.com> - 2016-10-22 02:10 +0200
      Re: [PATCH 2/5] stop_machine: yield CPU during stop machine Christian Borntraeger <borntraeger@de.ibm.com> - 2016-10-24 10:00 +0200
        Re: [PATCH 2/5] stop_machine: yield CPU during stop machine Peter Zijlstra <peterz@infradead.org> - 2016-10-24 10:50 +0200

csiph-web