Re: possible deadlock in smp_call_function()

Manfred (manfreds@colorfullife.com)
Sat, 25 Sep 1999 17:59:31 +0200


From: Alan Cox <alan@lxorguk.ukuu.org.uk>
> In fact is there any reason the lock on smp_call_function isnt just a
> semaphore acting as a queue manager ?
I don't know, most likely this is legacy code: perhaps it was written before
down_trylock() was implemented.

I checked the other architectures:
smp_call_function is a "portable" function, but it's only implemented for
i386 and alpha.
alpha: implementation identical to i386, they also use schedule().

it's currently used for:
* i386: MTRR.
* alpha: smp tlb flushing.

I'll replace spinlock and schedule() with a normal semaphore and
down()/down_trylock().

Ingo, could you also fix the UP version of smp_call_function in
<linux/smp.h>?
line 84:
- #define smp_call_function(func,info,retry,wait)
+ #define smp_call_function(func,info,retry,wait) (func,info,retry,wait,
0)

--
    Manfred

- 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/