Page MenuHomeFreeBSD

nvme: Use ISR exclusion to make reset safer
AbandonedPublic

Authored by imp on Oct 10 2022, 10:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 6:02 AM
Unknown Object (File)
Mon, Oct 14, 9:35 PM
Unknown Object (File)
Oct 7 2024, 5:39 AM
Unknown Object (File)
Oct 6 2024, 5:57 PM
Unknown Object (File)
Oct 6 2024, 6:51 AM
Unknown Object (File)
Oct 6 2024, 5:42 AM
Unknown Object (File)
Oct 5 2024, 11:22 PM
Unknown Object (File)
Oct 5 2024, 11:55 AM

Details

Reviewers
mav
chs
chuck
jhb
Summary

Before we send a hardware reset to the controller, mark all the admin
and I/O queues as being 'in the interrupt handler' so that we know all
interrupt handlers have excited. Once the hardware reset is complete,
unblock the interrupt hanlders so that we can bring the card back
up. This replaces a 100ms sleep that we use for this purpose today,
potentially making reset a little faster as well as safer.

Sponsored by: Netflix

Test Plan

Note: This assumes that this atomic is the right way to go.
Drew suggested maybe a full mutex, in which case this would change to that idiom.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53077
Build 49968: arc lint + arc unit

Event Timeline

imp requested review of this revision.Oct 10 2022, 10:24 PM
imp added reviewers: mav, chs, chuck.
sys/dev/nvme/nvme_ctrlr.c
1234

the last bit could be a separate commit, or I could drop it.

Add a timeout for waiting for the ISR to exit of 100ms. And fail the driver /
controller if it is stuck. I've not seen this, but I got to wondering what would
happen if...