[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 2/2] xen/arm: Fix deadlock in on_selected_cpus function
On Mon, 27 Jan 2014, Oleksandr Tyshchenko wrote: > This patch is needed to avoid possible deadlocks in case of simultaneous > occurrence cross-interrupts. > > Change-Id: I574b496442253a7b67a27e2edd793526c8131284 > Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@xxxxxxxxxxxxxxx> > Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@xxxxxxxxxxxxxxx> > --- > xen/common/smp.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/xen/common/smp.c b/xen/common/smp.c > index 2700bd7..46d2fc6 100644 > --- a/xen/common/smp.c > +++ b/xen/common/smp.c > @@ -55,7 +55,11 @@ void on_selected_cpus( > > ASSERT(local_irq_is_enabled()); > > - spin_lock(&call_lock); > + if (!spin_trylock(&call_lock)) { > + if (smp_call_function_interrupt()) > + return; > + spin_lock(&call_lock); > + } > > cpumask_copy(&call_data.selected, selected); So this is where you check for the return value of smp_call_function_interrupt. I think it would be better to move the on_selected_cpus call out of maintenance_interrupt, after the write to EOIR (caused by desc->handler->end(desc) at the end of xen/arch/arm/irq.c:do_IRQ). Maybe to a tasklet. Alternatively, as Ian suggested, we could increase the priotiry of SGIs but I am a bit wary of making that change at RC2. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |