Page MenuHomeFreeBSD

nvme: Reduce traffic to the doorbell register
ClosedPublic

Authored by imp on Oct 12 2021, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 10:31 AM
Unknown Object (File)
Fri, Dec 6, 1:07 AM
Unknown Object (File)
Thu, Dec 5, 5:38 PM
Unknown Object (File)
Nov 24 2024, 3:16 AM
Unknown Object (File)
Nov 17 2024, 9:44 PM
Unknown Object (File)
Nov 11 2024, 8:58 PM
Unknown Object (File)
Nov 4 2024, 12:40 PM
Unknown Object (File)
Oct 12 2024, 6:29 AM
Subscribers

Details

Summary

Reduce traffic to doorbell register when processing multiple completion
events at once. Only write it at the end of the loop after we've
processed everything (assuming we found at least one completion).

Sponsored by: Netflix

Test Plan

"boots for me"

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Oct 12 2021, 8:36 PM
imp added reviewers: chuck, mav.
sys/dev/nvme/nvme_qpair.c
669

It seems cq_head can be incremented above without done incremented and without panic on non-debug kernel, in which case the register won't be written, while I think it should unless we want to get back here again.

sys/dev/nvme/nvme_qpair.c
635–636

I'll move this up a few lines.... though I'm thinking of making this a 'panic', but maybe not yet.

If we 'accept' it, then bump the count of items we've cleared.

imp marked an inline comment as done.
imp added inline comments.
sys/dev/nvme/nvme_qpair.c
669

Good catch. Fixed.

This revision is now accepted and ready to land.Oct 13 2021, 6:34 PM
This revision was automatically updated to reflect the committed changes.
imp marked an inline comment as done.