From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758889AbcDMItL (ORCPT ); Wed, 13 Apr 2016 04:49:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:34150 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757822AbcDMItJ (ORCPT ); Wed, 13 Apr 2016 04:49:09 -0400 Subject: Re: [PATCH v5 0/6] Support calling functions on dedicated physical cpu To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org References: <1459952266-3687-1-git-send-email-jgross@suse.com> Cc: boris.ostrovsky@oracle.com, david.vrabel@citrix.com, mingo@redhat.com, peterz@infradead.org, Douglas_Warzecha@dell.com, pali.rohar@gmail.com, jdelvare@suse.com, linux@roeck-us.net, tglx@linutronix.de, hpa@zytor.com, jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com, rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org, x86@kernel.org From: Juergen Gross Message-ID: <570E07FD.4030403@suse.com> Date: Wed, 13 Apr 2016 10:49:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <1459952266-3687-1-git-send-email-jgross@suse.com> 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 06/04/16 16:17, Juergen Gross wrote: > Some hardware (e.g. Dell Studio laptops) require special functions to > be called on physical cpu 0 in order to avoid occasional hangs. When > running as dom0 under Xen this could be achieved only via special boot > parameters (vcpu pinning) limiting the hypervisor in it's scheduling > decisions. > > This patch series is adding a generic function to be able to temporarily > pin a (virtual) cpu to a dedicated physical cpu for executing above > mentioned functions on that specific cpu. The drivers (dcdbas and i8k) > requiring this functionality are modified accordingly. > > Changes in V5: > - patch 3: rename and reshuffle parameters of smp_call_on_cpu() as requested > by Peter Zijlstra > - patch 3: test target cpu to be online as requested by Peter Zijlstra > - patch 4: less wordy messages as requested by David Vrabel > > Changes in V4: > - move patches 5 and 6 further up in the series > - patch 2 (was 5): WARN_ONCE in case platform doesn't support pinning > as requested by Peter Zijlstra > - patch 3 (was 2): change return value in case of illegal cpu as > requested by Peter Zijlstra > - patch 3 (was 2): make pinning of vcpu an option as suggested by > Peter Zijlstra > - patches 5 and 6 (were 3 and 4): add call to get_online_cpus() > > Changes in V3: > - use get_cpu()/put_cpu() as suggested by David Vrabel > > Changes in V2: > - instead of manipulating the allowed set of cpus use cpu specific > workqueue as requested by Peter Zijlstra > - add include/linux/hypervisor.h to hide architecture specific stuff > from generic kernel code > > Juergen Gross (6): > xen: sync xen header > virt, sched: add generic vcpu pinning support > smp: add function to execute a function synchronously on a cpu > xen: add xen_pin_vcpu() to support calling functions on a dedicated > pcpu > dcdbas: make use of smp_call_on_cpu() > hwmon: use smp_call_on_cpu() for dell-smm i8k > > MAINTAINERS | 1 + > arch/x86/include/asm/hypervisor.h | 4 ++ > arch/x86/kernel/cpu/hypervisor.c | 11 +++++ > arch/x86/xen/enlighten.c | 40 +++++++++++++++ > drivers/firmware/dcdbas.c | 51 +++++++++---------- > drivers/hwmon/dell-smm-hwmon.c | 35 +++++++------ > include/linux/hypervisor.h | 17 +++++++ > include/linux/smp.h | 3 ++ > include/xen/interface/sched.h | 100 +++++++++++++++++++++++++++++++------- > kernel/smp.c | 51 +++++++++++++++++++ > kernel/up.c | 18 +++++++ > 11 files changed, 273 insertions(+), 58 deletions(-) > create mode 100644 include/linux/hypervisor.h > So patches 1, 3 and 4 are acked. Any comments regarding patches 2, 5 and 6? Juergen