HomeFreeBSD

callout(9): Allow spin locks use with callout_init_mtx().

Description

callout(9): Allow spin locks use with callout_init_mtx().

Implement lock_spin()/unlock_spin() lock class methods, moving the
assertion to _sleep() instead. Change assertions in callout(9) to
allow spin locks for both regular and C_DIRECT_EXEC cases. In case of
C_DIRECT_EXEC callouts spin locks are the only locks allowed actually.

As the first use case allow taskqueue_enqueue_timeout() use on fast
task queues. It actually becomes more efficient due to avoided extra
context switches in callout(9) thanks to C_DIRECT_EXEC.

MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D31778

Details

Provenance
mavAuthored on Sep 3 2021, 1:16 AM
Reviewer
hselasky
Differential Revision
D31778: callout(9): Allow spin locks use with callout_init_mtx()
Parents
rG7af4475a6e31: vmd(4): Major driver refactoring
Branches
Unknown
Tags
Unknown