Displaying 19 results from an estimated 19 matches for "smp_call_sync_on_phys_cpu".
2016 Apr 01
0
[PATCH v3 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
Use the smp_call_sync_on_phys_cpu() function to call system management
mode on cpu 0.
Signed-off-by: Juergen Gross <jgross at suse.com>
---
drivers/hwmon/dell-smm-hwmon.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-...
2016 Mar 21
0
[PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...rvisor specific indirection.
Such a pinning should last as short as possible as it might block
sensible vcpu scheduling and maybe other hypervisor functions like
suspending the system which rely on scheduling. To ensure this don't
let the current thread be preempted while the vcpu is pinned in
smp_call_sync_on_phys_cpu().
Signed-off-by: Juergen Gross <jgross at suse.com>
---
V2: adapt to using workqueues
add include/linux/hypervisor.h to hide architecture specific stuff
from generic kernel code
In case paravirt maintainers don't want to be responsible for
include/linux/hypervisor.h I could tak...
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...rvisor specific indirection.
Such a pinning should last as short as possible as it might block
sensible vcpu scheduling and maybe other hypervisor functions like
suspending the system which rely on scheduling. To ensure this don't
let the current thread be preempted while the vcpu is pinned in
smp_call_sync_on_phys_cpu().
Signed-off-by: Juergen Gross <jgross at suse.com>
---
V3: use getc_cpu()/put_cpu() as suggested by David Vrabel
V2: adapt to using workqueues
add include/linux/hypervisor.h to hide architecture specific stuff
from generic kernel code
In case paravirt maintainers don't want t...
2016 Apr 01
0
[PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu
...9 +++++++++
3 files changed, 55 insertions(+)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index c441407..fc9d21b 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -196,4 +196,6 @@ extern void arch_enable_nonboot_cpus_end(void);
void smp_setup_processor_id(void);
+int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par);
+
#endif /* __LINUX_SMP_H */
diff --git a/kernel/smp.c b/kernel/smp.c
index 7416544..62da74b 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -739,3 +739,47 @@ void wake_up_all_idle_cpus(void)
preempt_enable();
}
EXPORT_SYMBOL_GPL(wake_up_all_i...
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
...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
smp: add function to execute a function synchronously on a physical
cpu
dcdbas: make use of smp_call_sync_on_phys_cpu()
hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
xen: add xen_pin_vcpu() to support calling functions on a dedicated
pcpu
MAINTAINERS | 1 +
arch/x86/include/asm/hypervisor.h | 9 ++++
arch/x8...
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
...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
smp: add function to execute a function synchronously on a physical
cpu
dcdbas: make use of smp_call_sync_on_phys_cpu()
hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
xen: add xen_pin_vcpu() to support calling functions on a dedicated
pcpu
MAINTAINERS | 1 +
arch/x86/include/asm/hypervisor.h | 9 ++++
arch/x8...
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
...use cpu specific
workqueue as requested by Peter Zijlstra
- add include/linux/hypervisor.h to hide architecture specific stuff
from generic kernel cod
Juergen Gross (6):
xen: sync xen header
smp: add function to execute a function synchronously on a physical
cpu
dcdbas: make use of smp_call_sync_on_phys_cpu()
hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
xen: add xen_pin_vcpu() to support calling functions on a dedicated
pcpu
MAINTAINERS | 1 +
arch/x86/include/asm/hypervisor.h | 9 ++++
arch/x8...
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
...use cpu specific
workqueue as requested by Peter Zijlstra
- add include/linux/hypervisor.h to hide architecture specific stuff
from generic kernel cod
Juergen Gross (6):
xen: sync xen header
smp: add function to execute a function synchronously on a physical
cpu
dcdbas: make use of smp_call_sync_on_phys_cpu()
hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
xen: add xen_pin_vcpu() to support calling functions on a dedicated
pcpu
MAINTAINERS | 1 +
arch/x86/include/asm/hypervisor.h | 9 ++++
arch/x8...
2016 Mar 21
1
[Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
>>> On 21.03.16 at 13:24, <JGross at suse.com> wrote:
> @@ -758,9 +759,14 @@ struct smp_sync_call_struct {
> static void smp_call_sync_callback(struct work_struct *work)
> {
> struct smp_sync_call_struct *sscs;
> + unsigned int cpu = smp_processor_id();
So this obtains the vCPU number, yet ...
> sscs = container_of(work, struct smp_sync_call_struct, work);
2016 Mar 21
0
[Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On 21/03/16 14:42, Jan Beulich wrote:
>>>> On 21.03.16 at 13:24, <JGross at suse.com> wrote:
>> @@ -758,9 +759,14 @@ struct smp_sync_call_struct {
>> static void smp_call_sync_callback(struct work_struct *work)
>> {
>> struct smp_sync_call_struct *sscs;
>> + unsigned int cpu = smp_processor_id();
>
> So this obtains the vCPU number, yet
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On 01/04/16 09:43, Peter Zijlstra wrote:
> On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote:
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -14,6 +14,7 @@
>> #include <linux/smp.h>
>> #include <linux/cpu.h>
>> #include <linux/sched.h>
>> +#include <linux/hypervisor.h>
>>
>> #include
2016 Apr 01
1
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On Fri, Apr 01, 2016 at 11:03:21AM +0200, Juergen Gross wrote:
> > Maybe just make the vpin thing an option like:
> >
> > smp_call_on_cpu(int (*func)(void *), int phys_cpu);
> > Also; is something like the vpin thing possible on KVM? because if we're
> > going to expose it to generic code like this we had maybe look at wider
> > support.
>
> It is
2016 Mar 21
1
[Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
>>> On 21.03.16 at 13:24, <JGross at suse.com> wrote:
> @@ -758,9 +759,14 @@ struct smp_sync_call_struct {
> static void smp_call_sync_callback(struct work_struct *work)
> {
> struct smp_sync_call_struct *sscs;
> + unsigned int cpu = smp_processor_id();
So this obtains the vCPU number, yet ...
> sscs = container_of(work, struct smp_sync_call_struct, work);
2016 Apr 01
1
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On Fri, Apr 01, 2016 at 11:03:21AM +0200, Juergen Gross wrote:
> > Maybe just make the vpin thing an option like:
> >
> > smp_call_on_cpu(int (*func)(void *), int phys_cpu);
> > Also; is something like the vpin thing possible on KVM? because if we're
> > going to expose it to generic code like this we had maybe look at wider
> > support.
>
> It is
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On 01/04/16 10:44, Peter Zijlstra wrote:
> On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote:
>> On 01/04/16 09:43, Peter Zijlstra wrote:
>>> On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote:
>>>> --- a/kernel/smp.c
>>>> +++ b/kernel/smp.c
>>>> @@ -14,6 +14,7 @@
>>>> #include <linux/smp.h>
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...> #include <linux/export.h>
> #include <linux/smp.h>
> +#include <linux/hypervisor.h>
>
> int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
> int wait)
> @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond);
>
> int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par)
> {
> + int ret;
> +
> if (cpu != 0)
> return -EINVAL;
>
> - return func(par);
> + preempt_disable();
> + hypervisor_pin_vcpu(0);
> + ret = func(par);
> + hypervisor_pin_vcpu(-1);
> + preempt_enable();
>...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...> #include <linux/export.h>
> #include <linux/smp.h>
> +#include <linux/hypervisor.h>
>
> int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
> int wait)
> @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond);
>
> int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par)
> {
> + int ret;
> +
> if (cpu != 0)
> return -EINVAL;
>
> - return func(par);
> + preempt_disable();
> + hypervisor_pin_vcpu(0);
> + ret = func(par);
> + hypervisor_pin_vcpu(-1);
> + preempt_enable();
>...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote:
> On 01/04/16 09:43, Peter Zijlstra wrote:
> > On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote:
> >> --- a/kernel/smp.c
> >> +++ b/kernel/smp.c
> >> @@ -14,6 +14,7 @@
> >> #include <linux/smp.h>
> >> #include <linux/cpu.h>
> >> #include
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote:
> On 01/04/16 09:43, Peter Zijlstra wrote:
> > On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote:
> >> --- a/kernel/smp.c
> >> +++ b/kernel/smp.c
> >> @@ -14,6 +14,7 @@
> >> #include <linux/smp.h>
> >> #include <linux/cpu.h>
> >> #include