xen-devel
Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets
On 15/04/2010 10:59, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote:
>> Actually that's a good example because it now won't work, but for other
>> reasons! The hypercall continuation can interrupt another vcpu's execution,
>> and then try to synchronously pause that vcpu. Which will deadlock.
>>
>> Luckily I think we can re-jig this code to freeze_domains() before doing the
>> continue_hypercall_on_cpu(). I've cc'ed one of the CPU RAS guys. :-)
>
> Hmm, I have cc'ed one of the PM guys because it is enter_state :-)
> Can we add check in vcpu_sleep_sync() for current? It is meaningless to
> cpu_relax for current vcpu in that situation, especially if we are not in irq
> context.
> I'm not sure why in freeze_domains it only checkes dom0's vcpu for current,
> instead of all domains.
Well actually pausing any vcpu from within the hypercall continuation is
dangerous. The softirq handler running the hypercall continuation may have
interrupted some running VCPU X. And the VCPU Y that the continuation is
currently trying to pause may itself be trying to pause X. So we can get a
deadlock that way. The freeze_domains() *has* to be pulled outside of the
hypercall continuation.
It's a little bit similar to the super-subtle stop_machine_run deadlock
possibility I just emailed to you a second ago. :-)
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, (continued)
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Juergen Gross
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Juergen Gross
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Juergen Gross
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Juergen Gross
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Jiang, Yunhong
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets,
Keir Fraser <=
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Yu, Ke
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Yu, Ke
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Wei, Gang
- Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Keir Fraser
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Wei, Gang
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Wei, Gang
- RE: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets, Jiang, Yunhong
|
|
|