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

Warner Losh imp at harmony.village.org
Tue Apr 29 16:44:33 PDT 2003


In message <200304292254.h3TMsJ7F072778 at arch20m.dellroad.org> Archie Cobbs writes:
: >           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.

You shouldn't be doing attach/detach from an interrupt context, but
rather from a thread context.  Right now there's no locking, so it
works, but when locking goes in you might not be able do so.  Depends
on the choice of lock I have: faster spin locks wouldn't work, but
slower mutexes would.

Warner


More information about the freebsd-arch mailing list