lots of malloc(M_WAITOK)'s in interrupt context from camisr

Archie Cobbs archie at dellroad.org
Tue Apr 29 16:00:03 PDT 2003


John Baldwin wrote:
> 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
> of time.

Sure you can do that but I'm saying doing that is more complicated
than necessary in some situations.

>           Sleeping in an interrupt thread would destroy interrupt latency
> far worse than it is now.  I'm sure we can all agree that that would be
> unacceptable.

I'm only advocating doing it for rare events like device
insertion/removal, etc.

>                Rather than making the interrupt thread implementation
> very complex with magical spawning kthreads and such, I would prefer that
> driver authors kick up software interrupt threads and the like on their
> own and keep the ithread implementation simple.

I'd argue that complexity in one place is preferable to complexity
in 100 places (ie., every device driver).

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com


More information about the freebsd-arch mailing list