lots of malloc(M_WAITOK)'s in interrupt context from camisr
John Baldwin
jhb at FreeBSD.org
Thu May 1 08:31:52 PDT 2003
On 01-May-2003 Paul Richards wrote:
> On Thu, May 01, 2003 at 04:31:08PM +1000, Bruce Evans wrote:
>> On Wed, 30 Apr 2003, Andrew Gallatin wrote:
>>
>> > John Baldwin writes:
>> >
>> > > If you need to do more work in your interrupt routine than just wakeups
>> > > and dinking with registers, you can always wake up a software interrupt
>> > > handler or some other random kthread to do things that take a long amount
>>
>> (This is about normal interrupt handlers, not INTR_FAST ones.)
>>
>> > Dumb question: Exactly what is one allowed to do in an INTR_FAST
>> > interrupt context? Obviously, you can't sleep. But can you call
>> > wakeup()?
>
> What exactly defines a INTR_FAST interrupt context in the first
> place. Do we have any rules for when it should be used, it just
> seems to me that all interrupt handlers should be INTR_FAST and
> that we'd then just have interrupt handlers.
Since INTR_FAST handlers can't lock a normal mutex, this would
require all device drivers to use spin locks (which either disable
or defer interrupts) thus greatly increasing latency. INTR_FAST
are only suitable for things such as sio(4) which need very low
latency between interrupt assertion and handler execution and
cannot deal with that latency for normal interrupt handlers.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
More information about the freebsd-arch
mailing list