[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 6/6] VMX: Fixup PI descritpor when cpu is offline
>>> On 02.09.16 at 05:25, <feng.wu@xxxxxxxxx> wrote: >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx] >> Sent: Thursday, September 1, 2016 4:49 PM >> >>> On 31.08.16 at 05:56, <feng.wu@xxxxxxxxx> wrote: >> > + new_cpu = cpumask_any(&cpu_online_map); >> > + new_lock = &per_cpu(vmx_pi_blocking, new_cpu).lock; >> > + >> > + spin_lock(new_lock); >> > + >> > + /* >> > + * If the new_cpu is not online, that means it became offline >> > between >> > + * we got 'new_cpu' and acquiring its lock above, we need to find >> > + * another online cpu instead. Such as, this fucntion is being >> > called >> > + * on 'new_cpu' at the same time. Can this happen?? >> > + */ >> > + if ( !cpu_online(new_cpu) ) >> > + { >> > + spin_unlock(new_lock); >> > + goto restart; >> > + } >> >> ... I think this too has been discussed before: Is this case really >> possible? You're in the context of a CPU_DEAD or CPU_UP_CANCELED >> notification, which both get issued with cpu_add_remove_lock held. >> How can a second CPU go down in parallel? > > Here is the call chain: > > cpu_down() -> > stop_machine_run() -> > get_cpu_maps() /* Try to hold the cpu_add_remove_lock */ > ...... > put_cpu_maps() /* Release the lock */ > notifier_call_chain(..., CPU_DEAD, ...) -> > vmx_vcpu_dead() -> > vmx_pi_desc_fixup() > > Seems vmx_pi_desc_fixup() is not calling with holding cpu_add_remove_lock? > Or do I miss something? Thanks for further comments in advance! The only place I see CPU_DEAD being passed to the notifier is right in cpu_down(), with cpu_hotplug_done() (which is basically an alias of put_cpu_maps()) clearly called a few lines later. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |