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)
Sat, May 18, 11:16 AM
Unknown Object (File)
Tue, Apr 30, 10:30 AM
Unknown Object (File)
Tue, Apr 30, 10:30 AM
Unknown Object (File)
Tue, Apr 30, 10:29 AM
Unknown Object (File)
Tue, Apr 30, 7:07 AM
Unknown Object (File)
Mon, Apr 29, 3:43 AM
Unknown Object (File)
Sat, Apr 27, 3:44 AM
Unknown Object (File)
Wed, Apr 24, 8:33 PM

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...