HomeFreeBSD

destroy_dev_sched*: Don't hold Giant for all deferred destroy_dev.

Description

destroy_dev_sched*: Don't hold Giant for all deferred destroy_dev.

Rather than using taskqueue_swi_giant which holds Giant for all
deferred destroy_dev calls, create a separate queue for destroyed
devices with D_NEEDGIANT set in the corresponding cdevsw. The task
for this queue holds Giant whild destroying deferred devices while the
task for the default queue does not hold Giant.

In addition, switch to taskqueue_thread for destroy_dev_sched.
Deferred destroy_dev requests don't need to run at an SWI priority.

Reviewed by: imp, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D34915

Details

Provenance
jhbAuthored on Apr 18 2022, 7:04 PM
Reviewer
imp
Differential Revision
D34915: destroy_dev_sched*: Don't hold Giant for all deferred destroy_dev.
Parents
rGd399eb3ef7f8: ping: split the visual part of -f into a new option -.
Branches
Unknown
Tags
Unknown