Greetings,

we are writing a stack of layered kernel modules (actually, port it from 
Linux), with a hardware-handling driver at the bottom (call it A), and a 
module B that calls down into A. Next to this, A does upcalls into B.

A softint handler "si_B" (created and triggered) within B is waiting by 
blocking on a sema_p(). The correspondig sema_v() is to be performed 
within an upcall of a softint handler "si_A". si_A was created within A, 
and triggered there from a hard interrupt (level 12). Both handlers si_A 
and si_B have the same max. softint priority.

What we see now is that si_B is not signaled (by succeeding with the 
sema_p()), as si_A is trigged successfully, but not executed. Looking at 
av_dispatch_softvect() 
(http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/avintr.c#av_dispatch_softvect),
 
it seems that one possible cause for this is that softint handlers are 
executed sequentially, being called from the loop in this function. 
Could this cause this deadlock ?

A related question is then: if I create multiple softint handlers (all 
with the same priority) within a driver, will they ever be executed 
concurrently?

I know that we could use taskqueues (at least in B), or rewrite 
everything to avoid this situation in the first place, but this is not 
really an option right now (time matters).

We are using SXCE b103 AMD64 on a dual-core machine, if that matters.

  thanks, Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to