Page MenuHomeFreeBSD

cam: use disk_alloc_nowait
AbandonedPublic

Authored by imp on Mar 9 2021, 8:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 12, 8:29 PM
Unknown Object (File)
Tue, Aug 11, 8:06 PM
Unknown Object (File)
Sun, Aug 9, 7:58 PM
Unknown Object (File)
Sat, Aug 8, 2:25 AM
Unknown Object (File)
Fri, Aug 7, 9:41 AM
Unknown Object (File)
Fri, Aug 7, 2:22 AM
Unknown Object (File)
Tue, Aug 4, 4:40 AM
Unknown Object (File)
Mon, Aug 3, 5:04 AM
Subscribers

Details

Reviewers
ken
glebius
kevans
mav
scottl
Group Reviewers
cam
Summary

CAM drivers are created in a callback in xpt_done_td. This thread is marked
non-sleepable so that callbacks executed here don't block other completions. For
all these periph's register callbacks, use this to allocate the disk. Rearrange
a little so we allocate everything at the top of the function and return the
appropriate error after cleaning upt he allocations.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37708
Build 34597: arc lint + arc unit

Event Timeline

imp requested review of this revision.Mar 9 2021, 8:31 PM

Can drivers are created in a callback in xpt_done_td.

"CAM drivers are created in a callback in xpt_done_td." ?

Can drivers are created in a callback in xpt_done_td.

"CAM drivers are created in a callback in xpt_done_td." ?

fixed in my local copy and in this description here.

On second thought, I'm going to abandon this approach and schedule the cam register routine into a taskqueue so we can sleep. There's no good retry mechanism here, and adding one would make things more complicated. We can switch to waiting for memory to have a more robust system with simpler code. This also matches at least some of the feedback I've received privately (thanks Chuck). I'll post that review when I have it done.