Page MenuHomeFreeBSD

nvme: start qpair in state RECOVERY_WAITING
ClosedPublic

Authored by imp on Sep 28 2021, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 14, 9:49 PM
Unknown Object (File)
Oct 4 2024, 2:44 PM
Unknown Object (File)
Sep 27 2024, 10:55 PM
Unknown Object (File)
Sep 19 2024, 7:47 PM
Unknown Object (File)
Sep 18 2024, 5:11 AM
Unknown Object (File)
Sep 4 2024, 12:10 PM
Unknown Object (File)
Sep 4 2024, 7:26 AM
Unknown Object (File)
Aug 28 2024, 9:33 AM
Subscribers

Details

Summary

An interrupt happens on the admin queue right away after the reset, so
as soon as we enable interrupts, we'll get a call to our interrupt
handler. It is safe to ignore this interrupt if we're not yet
initialized, or to process it if we are. If we are initialized, we'll
see there's no completion records and return. If we're not, we'll
process no completion records and return. Either way, nothing
is processed and nothing is lost.

Until we've completely setup the qpair, we need to avoid processing
completion records. Start the qpair in the waiting recovery state so we
return immediately when we try to process completions. The code already
sets it to 'NONE' when we're initialization is complete. It's safe to
defer completion processing here because we don't send any commands
before the initialization of the software state of the qpair is
complete. And even if we were to somehow send a command prior to that
completing, the completion record for that command would be processed
when we send commands to the admin qpair after we've setup the software
state. There's no good central point to add an assert for this last
condition.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Sep 28 2021, 8:05 PM
imp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 28 2021, 8:26 PM

Confirmed, with this patch FreeBSD boots on EC2 arm64 instances, and without this patch it instapanics. Please commit. :-)

Confirmed, with this patch FreeBSD boots on EC2 arm64 instances, and without this patch it instapanics. Please commit. :-)

Can you also confirm https://reviews.freebsd.org/D32211 ? This is a sanity check I added which would have told me the problem more directly...

This revision was automatically updated to reflect the committed changes.