Re: PANIC: blockable slep lock (sx) msi _at_ ....msi.c:374

From: Julian Elischer <julian_at_elischer.org>
Date: Fri, 04 May 2007 15:31:52 -0700
Scott Long wrote:
> Julian Elischer wrote:
>> John Baldwin wrote:
>>
>>>
>>> This is wrong because once you do critical_enter(), you are free to 
>>> assume that you won't do a context switch until you critical_exit(), 
>>> and sx_xlock() would violate that if it blocked on the lock.
>>
>> wellllll critical enter doesn't block interupts so it's true if you 
>> don't call
>> an interrupt as a context switch.
>> (it doesn't SWITCH contexts but it does step into a different context.)
>>
> 
> Yes, interrupts are serviced when a critical section is entered, but 
> ithreads are not run on the same CPU until the critical section is 
> exited.  This has been debated quite a bit over the last few years, but
> I it's a good compromise.  This implications just don't seem to be 
> documented well, especially for those who need a protected, 
> uninterruptable context for doing time-critical operations.

I think what needs to be documented is a list of 
"Things thou shalt not do whilst within a FAST interrupt handler".

possibly in locking/9 amongst other places.
maybe in an interrupts(9) page?

> 
> Scott
Received on Fri May 04 2007 - 20:31:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:09 UTC