Question about interrupt threads

Bruce Evans bde at zeta.org.au
Thu Apr 24 06:13:18 PDT 2003


On Wed, 23 Apr 2003, Aniruddha Bohra wrote:

> Provided all ISRs spin on their locks, and do not sleep, we can assume the
> critical section to be small enough as to not allow interrupt handlers
> on other CPUs
> to spin for a long time. Then, the problem does go away. Or am I missing
> something important here ? Understandably while there is a GIANT lock
> protecting ISRs, this is not possible.

We can't assume that.  There are still lots of interrupt handlers and
hardware of dubious quality that take a remarkably long time to handle
interrupts.  Timeout routines can take several msec, and it can take
several msec to reach the timeout dispatcher (softclock).  Timeouts are
software interrupts, but software interrupts are not very different from
hardware ones in FreeBSD and it is hardware interrupts that delay
softclock (the main cause that I've seen here is VTY switching -- syscons
still uses busy waiting for setting the LEDs).

Bruce


More information about the freebsd-smp mailing list