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)
Wed, Apr 24, 3:59 AM
Unknown Object (File)
Wed, Apr 24, 3:59 AM
Unknown Object (File)
Wed, Apr 24, 3:59 AM
Unknown Object (File)
Wed, Apr 24, 3:44 AM
Unknown Object (File)
Mar 17 2024, 2:34 AM
Unknown Object (File)
Mar 7 2024, 11:31 PM
Unknown Object (File)
Feb 10 2024, 11:04 PM
Unknown Object (File)
Jan 27 2024, 4:58 PM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.