search for: sscs

Displaying 20 results from an estimated 29 matches for "sscs".

Did you mean: secs
2016 Apr 05
0
[PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu
...o support virtualized environments. + */ +struct smp_call_on_cpu_struct { + struct work_struct work; + struct completion done; + int (*func)(void *); + void *data; + int ret; + int cpu; +}; + +static void smp_call_on_cpu_callback(struct work_struct *work) +{ + struct smp_call_on_cpu_struct *sscs; + + sscs = container_of(work, struct smp_call_on_cpu_struct, work); + if (sscs->cpu >= 0) + hypervisor_pin_vcpu(sscs->cpu); + sscs->ret = sscs->func(sscs->data); + if (sscs->cpu >= 0) + hypervisor_pin_vcpu(-1); + + complete(&sscs->done); +} + +int smp_call_on_cpu(u...
2016 Apr 06
0
[PATCH v5 3/6] smp: add function to execute a function synchronously on a cpu
...o support virtualized environments. + */ +struct smp_call_on_cpu_struct { + struct work_struct work; + struct completion done; + int (*func)(void *); + void *data; + int ret; + int cpu; +}; + +static void smp_call_on_cpu_callback(struct work_struct *work) +{ + struct smp_call_on_cpu_struct *sscs; + + sscs = container_of(work, struct smp_call_on_cpu_struct, work); + if (sscs->cpu >= 0) + hypervisor_pin_vcpu(sscs->cpu); + sscs->ret = sscs->func(sscs->data); + if (sscs->cpu >= 0) + hypervisor_pin_vcpu(-1); + + complete(&sscs->done); +} + +int smp_call_on_cpu(u...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...t; > #include <linux/sched.h> > +#include <linux/hypervisor.h> > > #include "smpboot.h" > > @@ -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; > > sscs = container_of(work, struct smp_sync_call_struct, work); > + cpu = get_cpu(); > + hypervisor_pin_vcpu(cpu); > sscs->ret = sscs->func(sscs->data); > + hypervisor_pin_vcpu(-1); > + put_cpu(); > > complete(&sscs->d...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...t; > #include <linux/sched.h> > +#include <linux/hypervisor.h> > > #include "smpboot.h" > > @@ -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; > > sscs = container_of(work, struct smp_sync_call_struct, work); > + cpu = get_cpu(); > + hypervisor_pin_vcpu(cpu); > sscs->ret = sscs->func(sscs->data); > + hypervisor_pin_vcpu(-1); > + put_cpu(); > > complete(&sscs->d...
2016 Apr 01
0
[PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu
...eturn only after the called function has + * returned. + */ +struct smp_sync_call_struct { + struct work_struct work; + struct completion done; + int (*func)(void *); + void *data; + int ret; +}; + +static void smp_call_sync_callback(struct work_struct *work) +{ + struct smp_sync_call_struct *sscs; + + sscs = container_of(work, struct smp_sync_call_struct, work); + sscs->ret = sscs->func(sscs->data); + + complete(&sscs->done); +} + +int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) +{ + struct smp_sync_call_struct sscs = { + .work = __WORK_INITI...
2016 Apr 05
1
[PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu
...nsigned int cpu, bool pin, int (*func)(void *), void *par) Why .pin and not .phys? .pin does not (to me) reflect the hypervisor/physical-cpu thing. Also, as per smp_call_function_single() would it not be more consistent to make this the last argument? > +{ > + struct smp_call_on_cpu_struct sscs = { > + .work = __WORK_INITIALIZER(sscs.work, smp_call_on_cpu_callback), > + .done = COMPLETION_INITIALIZER_ONSTACK(sscs.done), > + .func = func, > + .data = par, > + .cpu = pin ? cpu : -1, > + }; > + > + if (cpu >= nr_cpu_ids) You might want to also include cpu_on...
2016 Apr 05
1
[PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu
...nsigned int cpu, bool pin, int (*func)(void *), void *par) Why .pin and not .phys? .pin does not (to me) reflect the hypervisor/physical-cpu thing. Also, as per smp_call_function_single() would it not be more consistent to make this the last argument? > +{ > + struct smp_call_on_cpu_struct sscs = { > + .work = __WORK_INITIALIZER(sscs.work, smp_call_on_cpu_callback), > + .done = COMPLETION_INITIALIZER_ONSTACK(sscs.done), > + .func = func, > + .data = par, > + .cpu = pin ? cpu : -1, > + }; > + > + if (cpu >= nr_cpu_ids) You might want to also include cpu_on...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...x/hypervisor.h> > >> > >> #include "smpboot.h" > >> > >> @@ -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; > >> > >> sscs = container_of(work, struct smp_sync_call_struct, work); > >> + cpu = get_cpu(); > >> + hypervisor_pin_vcpu(cpu); > >> sscs->ret = sscs->func(sscs->data); > >> + hypervisor_pin_vcp...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...x/hypervisor.h> > >> > >> #include "smpboot.h" > >> > >> @@ -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; > >> > >> sscs = container_of(work, struct smp_sync_call_struct, work); > >> + cpu = get_cpu(); > >> + hypervisor_pin_vcpu(cpu); > >> sscs->ret = sscs->func(sscs->data); > >> + hypervisor_pin_vcp...
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
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
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
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
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
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
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
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
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...d.h> >> +#include <linux/hypervisor.h> >> >> #include "smpboot.h" >> >> @@ -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; >> >> sscs = container_of(work, struct smp_sync_call_struct, work); >> + cpu = get_cpu(); >> + hypervisor_pin_vcpu(cpu); >> sscs->ret = sscs->func(sscs->data); >> + hypervisor_pin_vcpu(-1); >> + put_cpu(); >&g...
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...t;>>> >>>> #include "smpboot.h" >>>> >>>> @@ -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; >>>> >>>> sscs = container_of(work, struct smp_sync_call_struct, work); >>>> + cpu = get_cpu(); >>>> + hypervisor_pin_vcpu(cpu); >>>> sscs->ret = sscs->func(sscs->data); >>>>...
2016 Apr 05
10
[PATCH v4 0/6] Support calling functions on dedicated physical cpu
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
2016 Apr 05
10
[PATCH v4 0/6] Support calling functions on dedicated physical cpu
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
2016 Mar 21
0
[PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...t;linux/smp.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/hypervisor.h> #include "smpboot.h" @@ -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(); sscs = container_of(work, struct smp_sync_call_struct, work); + preempt_disable(); + hypervisor_pin_vcpu(cpu); sscs->ret = sscs->func(sscs->data); + hypervisor_pin_vcpu(-1); + preempt_enable(); complete(&sscs->done); } diff --git...
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...t;linux/smp.h> #include <linux/cpu.h> #include <linux/sched.h> +#include <linux/hypervisor.h> #include "smpboot.h" @@ -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; sscs = container_of(work, struct smp_sync_call_struct, work); + cpu = get_cpu(); + hypervisor_pin_vcpu(cpu); sscs->ret = sscs->func(sscs->data); + hypervisor_pin_vcpu(-1); + put_cpu(); complete(&sscs->done); } diff --git a/kernel/up.c b/kernel/up.c in...
2016 Aug 29
6
[PATCH v6 0/6] Support calling functions on dedicated physical cpu
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