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)
Mar 15 2024, 8:54 AM
Unknown Object (File)
Feb 1 2024, 9:15 AM
Unknown Object (File)
Jan 9 2024, 3:12 AM
Unknown Object (File)
Jan 9 2024, 3:12 AM
Unknown Object (File)
Jan 9 2024, 2:54 AM
Unknown Object (File)
Dec 31 2023, 11:40 AM
Unknown Object (File)
Dec 23 2023, 1:56 AM
Unknown Object (File)
Nov 7 2023, 11:15 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.