Page MenuHomeFreeBSD

nvme: Move AER processing into a task thread
ClosedPublic

Authored by imp on Jul 18 2025, 11:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 7:56 PM
Unknown Object (File)
Sun, Oct 12, 7:56 PM
Unknown Object (File)
Sun, Oct 12, 8:21 AM
Unknown Object (File)
Sep 8 2025, 8:22 AM
Unknown Object (File)
Aug 24 2025, 8:15 AM
Unknown Object (File)
Jul 29 2025, 4:37 AM
Unknown Object (File)
Jul 28 2025, 5:27 PM
Unknown Object (File)
Jul 28 2025, 12:42 AM
Subscribers

Details

Summary

Move the AER processing into the taskqueue thread. We do memory
allocations and such burried deep in things we call, so this just makes
all that simpler and doesn't stall the completion thread. It fixes a few
panics if you get a reliability failure from the drive at the wrong
time.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Jul 18 2025, 11:10 PM

We see about 1-3 crashes a month from this from our fleet of NVMe drives at work...

sys/dev/nvme/nvme_ctrlr.c
1176

For the record, I think we shouldn't be doing this byte swapping and should use the appropriate leXXtohost() functions where we use the data, but that's a bigger change for another day. Also, I don't have BE hardware to test this on.

nvmf already uses a taskqueue for this for the same reasons.

In D51416#1175601, @jhb wrote:

nvmf already uses a taskqueue for this for the same reasons.

Yea, I need to close this since I'd accidentally pushed this when I was pushing other changes.

This revision is now accepted and ready to land.Jul 23 2025, 7:48 PM