From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751743AbcGNIWJ (ORCPT ); Thu, 14 Jul 2016 04:22:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51345 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027AbcGNIVi (ORCPT ); Thu, 14 Jul 2016 04:21:38 -0400 Subject: Re: [patch V2 31/67] KVM/x86: Remove superfluous SMP function call To: Anna-Maria Gleixner , LKML References: <20160713153219.128052238@linutronix.de> <20160713153335.452527104@linutronix.de> Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , rt@linutronix.de, Linus Torvalds , Radim Krcmar , kvm@vger.kernel.org From: Paolo Bonzini Message-ID: <8152fe02-5b08-c1e0-c323-f0d2d5e05602@redhat.com> Date: Thu, 14 Jul 2016 10:21:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160713153335.452527104@linutronix.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 14 Jul 2016 08:21:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/2016 19:16, Anna-Maria Gleixner wrote: > From: Anna-Maria Gleixner > > Since the following commit: > > 1cf4f629d9d2 ("cpu/hotplug: Move online calls to hotplugged cpu") > > ... the CPU_ONLINE and CPU_DOWN_PREPARE notifiers are always run on the hot > plugged CPU, and as of commit: > > 3b9d6da67e11 ("cpu/hotplug: Fix rollback during error-out in __cpu_disable()") > > the CPU_DOWN_FAILED notifier also runs on the hot plugged CPU. This patch > converts the SMP functional calls into direct calls. > > smp_function_call_single() executes the function with interrupts > disabled. This calling convention is not preserved because there > is no reason to do so. > > Signed-off-by: Anna-Maria Gleixner > Cc: Linus Torvalds > Cc: Paolo Bonzini > Cc: Peter Zijlstra > Cc: Radim Krcmar > Cc: Thomas Gleixner > Cc: kvm@vger.kernel.org > --- > arch/x86/kvm/x86.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -5662,15 +5662,13 @@ static struct notifier_block kvmclock_cp > static int kvmclock_cpu_notifier(struct notifier_block *nfb, > unsigned long action, void *hcpu) > { > - unsigned int cpu = (unsigned long)hcpu; > - > switch (action) { > case CPU_ONLINE: > case CPU_DOWN_FAILED: > - smp_call_function_single(cpu, tsc_khz_changed, NULL, 1); > + tsc_khz_changed(NULL); > break; > case CPU_DOWN_PREPARE: > - smp_call_function_single(cpu, tsc_bad, NULL, 1); > + tsc_bad(NULL); > break; > } > return NOTIFY_OK; > > Acked-by: Paolo Bonzini