smp_call_function WARN_ON
Quoted 5 lines · Zwane
The
WARN_ON()is really only true if you're waiting for the other processors.
Wrong: At least on i386 the code always waits for delivery of the IPI, it just doesn't wait for completion of the callback.
Do you need IPIs from irq or bh context? It would be tricky to change the current code: an IPI just delivers an interrupt without any payload. The global 'call_data' variable contains the description of the IPI and accesses to it must be synchronized.
IPIs from BH context do no work either: they can deadlock against the tasklist_lock: the first cpu calls read_lock(&tasklist_lock) from process context, another cpu calls write_lock_irq(&tasklist_lock), and then the first cpu tries smp_call_function() from bh context.
--
Manfred
Quoted 6 lines · Manfred Spraul
Wrong: At least on i386 the code always waits for delivery of the IPI, it just doesn't wait for completion of the callback.
Do you need IPIs from irq or bh context? It would be tricky to change the current code: an IPI just delivers an interrupt without any payload. The global 'call_data' variable contains the description of the IPI and accesses to it must be synchronized.
Oops yes you're right, i'd have to setup a seperate vector to be able to do it without the wait entirely. Sorry about the noise.
Thanks,
Zwane