Re: [PATCH -v2] use per cpu data for single cpu ipi calls

From: Steven Rostedt
Date: Thu Jan 29 2009 - 12:51:03 EST



On Thu, 29 Jan 2009, Steven Rostedt wrote:
>
> >
> > But to be irq-safe, you now need to protect the _whole_ region against
> > interrupts, because otherwise an incoming interrupt will hit while the
> > CSD_FLAG_LOCK bit is set, perhaps _before_ the actual IPI has been sent,
> > and now nothing will ever clear it. So the interrupt handler that tries to
> > send an IPI will now spin forever.
>
> Again, this code is not allowed to run from an interrupt handler.
>
> >
> > So NAK on this patch. I think the approach is correct, but the
> > implementation is buggy.

My whole assumption of this is that smp_call_function_single can not be
called from an interrupt handler. If it can, then perhaps I just change
the spinlock to the cmpxchg code, and put a:

WARN_ON(cpu == smp_processor_id());

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/