Page MenuHomeFreeBSD

ada: create ada_reprobe for common probe starting logic
Needs ReviewPublic

Authored by imp on Apr 24 2022, 2:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 5:16 PM
Unknown Object (File)
Mon, Apr 22, 6:57 AM
Unknown Object (File)
Feb 25 2024, 5:11 AM
Unknown Object (File)
Jan 10 2024, 12:17 PM
Unknown Object (File)
Dec 20 2023, 5:31 AM
Unknown Object (File)
Dec 12 2023, 11:01 AM
Unknown Object (File)
Sep 20 2023, 5:21 PM
Unknown Object (File)
Sep 6 2023, 9:09 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.