From: Anna-Maria Gleixner <anna-maria@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
rt@linutronix.de, Anna-Maria Gleixner <anna-maria@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>,
kvm@vger.kernel.org
Subject: [patch V2 31/67] KVM/x86: Remove superfluous SMP function call
Date: Wed, 13 Jul 2016 17:16:32 -0000 [thread overview]
Message-ID: <20160713153335.452527104@linutronix.de> (raw)
In-Reply-To: 20160713153219.128052238@linutronix.de
[-- Attachment #1: 0030-KVM-x86-Remove-superfluous-SMP-function-call.patch --]
[-- Type: text/plain, Size: 1574 bytes --]
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
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 <anna-maria@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim Krcmar <rkrcmar@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
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;
next parent reply other threads:[~2016-07-13 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160713153219.128052238@linutronix.de>
2016-07-13 17:16 ` Anna-Maria Gleixner [this message]
2016-07-14 8:21 ` [patch V2 31/67] KVM/x86: Remove superfluous SMP function call Paolo Bonzini
2016-07-13 17:16 ` [patch V2 32/67] x86/kvm/kvmclock: Convert to hotplug state machine Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 36/67] virt: Convert kvm hotplug to " Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 44/67] arm/kvm/vgic: Convert to hotplug " Anna-Maria Gleixner
2016-07-13 17:16 ` [patch V2 45/67] arm/kvm/arch_timer: " Anna-Maria Gleixner
2016-07-13 17:17 ` [patch V2 60/67] KVM/arm/arm64/vgic-new: " Anna-Maria Gleixner
2016-07-14 13:08 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160713153335.452527104@linutronix.de \
--to=anna-maria@linutronix.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=rt@linutronix.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).