CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2025/04/23 09:07:00

Modified files:
        sys/conf       : files 
Added files:
        sys/kern       : kern_softintr.c 
        sys/sys        : softintr.h 

Log message:
Add MI high-level software interrupt dispatcher

This provides a common subsystem for the high-level allocation,
scheduling, and dispatching of soft interrupts. This will reduce
duplication in the MD code, improve consistency, and hopefully
ease maintenance and future development, once all architectures
have been migrated.

MP-readiness is built-in. When a soft interrupt is allocated with
IPL_MPSAFE, the handler will be called without the kernel lock.
Deallocation has an automatic barrier that blocks until the
soft interrupt has stopped.

As an extra feature, the dispatcher serializes each soft interrupt
so that the handler does not execute on more than one CPU at a time.
A typical MP-safe soft interrupt handler probably uses some kind of
locking anyway, so this serialization should reduce needless spinning.
This feature can be made optional later if necessary.

Input from cheloha@ and kettenis@
OK mvs@

Reply via email to