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)
Dec 14 2024, 2:15 AM
Unknown Object (File)
Nov 2 2024, 6:54 AM
Unknown Object (File)
Nov 2 2024, 6:54 AM
Unknown Object (File)
Nov 2 2024, 6:45 AM
Unknown Object (File)
Oct 9 2024, 8:02 AM
Unknown Object (File)
Oct 9 2024, 8:02 AM
Unknown Object (File)
Oct 9 2024, 7:46 AM
Unknown Object (File)
Oct 6 2024, 4:08 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.