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, Mar 9, 3:57 PM
Unknown Object (File)
Thu, Mar 7, 11:44 PM
Unknown Object (File)
Feb 5 2024, 10:43 PM
Unknown Object (File)
Dec 26 2023, 5:20 AM
Unknown Object (File)
Dec 20 2023, 7:51 AM
Unknown Object (File)
Dec 12 2023, 10:45 AM
Unknown Object (File)
Nov 19 2023, 1:00 PM
Unknown Object (File)
Nov 1 2023, 5:21 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.