cvs commit: src/sys/kern subr_power.c

Bruce Evans bde at zeta.org.au
Thu Nov 10 08:14:45 GMT 2005


On Wed, 9 Nov 2005, Scott Long wrote:

> ...
> Bruce Evans wrote:
>> 
>> 
>> Er, SWIs are interrupts too.  Trying to sleep in a SWI handler should
>> cause the same message.  This commit uses the general taskqueue SWI
>> handler.  taskqueue(9) implicitly says that only the taskqueue thread
>> handler can sleep (it gives malloc(M_WAITOK) as an example of something
>> that can only be done in thread context).
>> 
>> Bruce

Please trim quotes when replying.

> You're right, but sleeping in SWI's has never been enforced.  CAM relies on 
> it, for better or worse, and until that's fixed it's pointless to
> start enforcing it.

CAM at least shoots only itself in the foot if its SWIs block.  The
taskqueue SWIs are shared, so sleeping in them is like sleeping in a
timeout ISR (not quite as bad, since SWI_TQ* > SWI_CLOCK).  Blocking
on Giant to enter a taskqueue SWISR would be like blocking on Giant
to enter a timeout ISR except it is handled better by having a
separate ISR for cases that need Giant.

Bruce


More information about the cvs-src mailing list