possible deadlock in smp_call_function()?

Manfred Spraul (manfreds@colorfullife.com)
Sat, 25 Sep 1999 12:28:40 +0000


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 */
^^^^^^^^^
> continue;
> }
> spin_lock (&lock);
> if (smp_call_function_data) {
> spin_unlock (&lock); /* Bad luck */
> continue;
> }
> /* Mine, all mine! */
> break;
> }
> }

Is that ok?
e.g what if the current thread is a realtime thread, could this
deadlock? Is is possible that schedule() will never return?

I've written a small patch which enables _PAGE_GLOBAL for module memory,
but currently, the kernel locks hard during X startup.

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