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

(cherry picked from commit d139909d6e8d540c0b832554d1b77fef0cf215b6)

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
rGfe822a6fd660: arm ti_mbox_attach: Write sysconfig to TI_MBOX_SYSCONFIG to request reset.
Branches
Unknown
Tags
Unknown