i386: smp_call_function()

Manfred Spraul (manfreds@colorfullife.com)
Fri, 10 Dec 1999 17:27:11 +0100


smp_call_function() has a "nonatomic" paramter. If this variable is set,
then smp_call_function will schedule() until the required data structure
is available.

3 functions use smp_call_function():

* flush_tlb_all(): loops until the semaphore is free. On UP, this would
be a lock-up, but AFAICS, the semaphore cannot be busy on UP.

* smp_send_stop(): calls smp_call_function() with disabled interrupts,
but with nonatomic=1. This means that panic() could schedule.

* mtrr.c: calls smp_call_function() with disabled mtrr's and disabled
local caches.

--> smp_call_function() must not schedule().

What about removing the "nonatomic" parameter, and replacing the
semaphore with a spinlock?

Btw, the alpha implementation of smp_call_function uses a
"pointer_lock()" function. What's a pointerlock? It calls schedule()
without setting SCHED_YIELD, it looks like a broken semaphore.

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