Page MenuHomeFreeBSD

ada: create ada_reprobe for common probe starting logic
AbandonedPublic

Authored by imp on Apr 24 2022, 2:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 3, 3:46 AM
Unknown Object (File)
Dec 8 2024, 3:44 AM
Unknown Object (File)
Nov 22 2024, 7:04 PM
Unknown Object (File)
Oct 14 2024, 12:59 PM
Unknown Object (File)
Oct 8 2024, 8:59 AM
Unknown Object (File)
Sep 30 2024, 2:10 PM
Unknown Object (File)
Sep 30 2024, 11:52 AM
Unknown Object (File)
Sep 30 2024, 7:59 AM
Subscribers
None

Details

Reviewers
mav
Group Reviewers
cam
Summary

Move all the logic for where to start the probing state machine into
ada_repobe and use it everywhere we probe or reprobe the device.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Apr 24 2022, 2:33 AM
imp added a parent revision: D35039: ada: Eliminate dead code.

While I see no problem with this patch, I am not sure it is not an obfuscation. The same checks are done (or should be done) at every probe stage. The check seems to be missing on transition from ADA_CCB_RAHEAD to ADA_STATE_WCACHE. I think "goto skipstate" logic of dastart() could be more universal.

In D35040#794429, @mav wrote:

While I see no problem with this patch, I am not sure it is not an obfuscation. The same checks are done (or should be done) at every probe stage. The check seems to be missing on transition from ADA_CCB_RAHEAD to ADA_STATE_WCACHE. I think "goto skipstate" logic of dastart() could be more universal.

That's good feedback, actually. I'm trying to reduce the code duplications here...

I'm poking around here because we have a race that somehow related to restarting this probe when a device 'stutters' in the system (eg, we get a lot of AHCI bus resets). The race leads to us tearing down the periph with a CCB in the hardware for the device. I'm still exploring that race (we see it 2-3 times a week in our fleet of many thousands of machines with AHCI attached drives). Any check I'd want to put here would also be relevant to for the state transitions... I'll take a look at skipstate, since that might accomplish my goals in a different way.

I'm torn on this, but I'm going to punt to declutter my life