Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361885
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() |
| Date | 2016-03-21 15:30 +0100 |
| Message-ID | <rf90d-6WY-3@gated-at.bofh.it> (permalink) |
| References | <rf785-5yn-5@gated-at.bofh.it> <rf788-5yn-57@gated-at.bofh.it> <rf90d-6WY-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 21/03/16 14:42, Jan Beulich wrote:
>>>> On 21.03.16 at 13:24, <JGross@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);
>> + preempt_disable();
>> + hypervisor_pin_vcpu(cpu);
>
> ... here you're supposed to pass a pCPU number.
>
> Also don't you need to call smp_processor_id() after preempt_disable()?
No, I'm running on the workqueue bound to the specific (v)cpu and I'm
expecting this vcpu to be pinned to the same numbered pcpu.
preempt_disable() is just called to avoid scheduling of another thread
while the override pinning is active.
Juergen
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/6] Support calling functions on dedicated physical cpu Juergen Gross <jgross@suse.com> - 2016-03-21 13:30 +0100
[PATCH v2 1/6] xen: sync xen header Juergen Gross <jgross@suse.com> - 2016-03-21 13:30 +0100
[PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() Juergen Gross <jgross@suse.com> - 2016-03-21 13:30 +0100
Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() "Jan Beulich" <JBeulich@suse.com> - 2016-03-21 14:50 +0100
Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() David Vrabel <david.vrabel@citrix.com> - 2016-03-21 15:20 +0100
Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() Juergen Gross <jgross@suse.com> - 2016-03-21 15:30 +0100
csiph-web