From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933449AbcJUMlx (ORCPT ); Fri, 21 Oct 2016 08:41:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:56388 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933416AbcJUMlt (ORCPT ); Fri, 21 Oct 2016 08:41:49 -0400 Subject: Re: [PATCH 2/5] stop_machine: yield CPU during stop machine To: Peter Zijlstra , Christian Borntraeger References: <1477051138-1610-1-git-send-email-borntraeger@de.ibm.com> <1477051138-1610-3-git-send-email-borntraeger@de.ibm.com> <20161021120536.GC3142@twins.programming.kicks-ass.net> Cc: linux-arch@vger.kernel.org, linux-s390 , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Heiko Carstens , linux-kernel@vger.kernel.org, Nicholas Piggin , virtualization@lists.linux-foundation.org, Noam Camus , Martin Schwidefsky , linuxppc-dev@lists.ozlabs.org From: Juergen Gross Message-ID: Date: Fri, 21 Oct 2016 14:41:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161021120536.GC3142@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/16 14:05, Peter Zijlstra wrote: > On Fri, Oct 21, 2016 at 01:58:55PM +0200, Christian Borntraeger wrote: >> 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. > > This seems something that would apply to most other virt stuff. Lets Cc > a few more lists for that. Corrected xen-devel mail address. Juergen > >> Signed-off-by: Christian Borntraeger >> --- >> 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 >> > _______________________________________________ > Virtualization mailing list > Virtualization@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/virtualization >