* Re: [PATCH] smp_call_function WARN_ON
@ 2004-08-15 6:55 Manfred Spraul
2004-08-15 7:51 ` Zwane Mwaikambo
0 siblings, 1 reply; 3+ messages in thread
From: Manfred Spraul @ 2004-08-15 6:55 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: linux-kernel, Andrew Morton
Zwane wrote:
>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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] smp_call_function WARN_ON
2004-08-15 6:55 [PATCH] smp_call_function WARN_ON Manfred Spraul
@ 2004-08-15 7:51 ` Zwane Mwaikambo
0 siblings, 0 replies; 3+ messages in thread
From: Zwane Mwaikambo @ 2004-08-15 7:51 UTC (permalink / raw)
To: Manfred Spraul; +Cc: linux-kernel, Andrew Morton
On Sun, 15 Aug 2004, Manfred Spraul wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] smp_call_function WARN_ON
@ 2004-08-15 3:03 Zwane Mwaikambo
0 siblings, 0 replies; 3+ messages in thread
From: Zwane Mwaikambo @ 2004-08-15 3:03 UTC (permalink / raw)
To: Linux Kernel; +Cc: Andrew Morton
The WARN_ON() is really only true if you're waiting for the other
processors.
Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Index: linux-2.6.8-rc4-mm1/arch/i386/kernel/smp.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.8-rc4-mm1/arch/i386/kernel/smp.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 smp.c
--- linux-2.6.8-rc4-mm1/arch/i386/kernel/smp.c 10 Aug 2004 14:49:26 -0000 1.1.1.1
+++ linux-2.6.8-rc4-mm1/arch/i386/kernel/smp.c 13 Aug 2004 18:46:11 -0000
@@ -538,7 +538,7 @@ int smp_call_function (void (*func) (voi
}
/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ WARN_ON(wait && irqs_disabled());
data.func = func;
data.info = info;
Index: linux-2.6.8-rc4-mm1/arch/x86_64/kernel/smp.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.8-rc4-mm1/arch/x86_64/kernel/smp.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 smp.c
--- linux-2.6.8-rc4-mm1/arch/x86_64/kernel/smp.c 10 Aug 2004 14:49:30 -0000 1.1.1.1
+++ linux-2.6.8-rc4-mm1/arch/x86_64/kernel/smp.c 13 Aug 2004 18:45:54 -0000
@@ -417,7 +417,7 @@ int smp_call_function (void (*func) (voi
return 0;
/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ WARN_ON(wait && irqs_disabled());
data.func = func;
data.info = info;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-15 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 6:55 [PATCH] smp_call_function WARN_ON Manfred Spraul
2004-08-15 7:51 ` Zwane Mwaikambo
-- strict thread matches above, loose matches on Subject: below --
2004-08-15 3:03 Zwane Mwaikambo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®