HomeFreeBSD

cam: Run all XPT_ASYNC ccbs in a dedicated thread

Description

cam: Run all XPT_ASYNC ccbs in a dedicated thread

Queue all XPT_ASYNC ccb's and run those in a new cam async thread. This thread
is allowed to sleep for things like memory. This should allow us to make all the
registration routines for cam periph drivers simpler since they can assume they
can always allocate memory. This is a separate thread so that any I/O that's
completed in xpt_done_td isn't held up.

This should fix the panics for WAITOK alloations that are elsewhere in the
storage stack that aren't so easy to convert to NOWAIT. Additional future work
will convert other allocations in the registration path to WAITOK should
detailed analysis show it to be safe.

Reviewed by: chs@, rpokala@
Differential Revision: https://reviews.freebsd.org/D29210

Details

Provenance
impAuthored on Mar 12 2021, 8:20 PM
Differential Revision
D29210: cam: Run all XPT_ASYNC ccbs in a dedicated thread
Parents
R10:5fe0cd6503d3: ccr: Disable requests on port 1 when needed to workaround a firmware bug.
Branches
Unknown
Tags
Unknown