Re: possible deadlock in smp_call_function()?

Richard Gooch (rgooch@ras.ucalgary.ca)
Sat, 25 Sep 1999 13:15:33 -0600


Ingo Molnar writes:
>
> On Sat, 25 Sep 1999, Manfred Spraul wrote:
>
> > if the smp_function area is busy, then smp_call_function() executes the
> > following code:
> >
> > > if (retry) {
> > > while (1) {
> > > if (smp_call_function_data) {
> > > schedule (); /* Give a mate a go */
> > ^^^^^^^^^
>
> yeah, i've been wondering about that one as well. Basically you have
> to be careful to either call it without the retry option, or make
> sure to not call it with spinlocks held. I'll fix this in my APIC
> patches to yield instead of pure schedule().

The MTRR code calls it with retry=1 and with another spinlock held,
and this is fine. In fact, I wrote smp_call_function() to support the
MTRR code (and similar codes I have sitting around which I'll submit
when I have the time). I don't see the problem that is being alluded
to.

So please don't change smp_call_function() yet. Explain to me the
sequence of events that can cause a deadlock.

Regards,

Richard....
Old: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

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