Repository navigation
Conversation
Author
|
Upstream branch: de52810 |
…on processors Commit 4f50224 ("nvme: wire up completion batching for the IRQ path") introduced completion batching to the NVMe IRQ handling path. While this change brings performance gains on mainstream platforms, it causes a severe random read performance regression on Hygon platforms. The batching logic defers CQE processing until after the doorbell is written. On Hygon microarchitectures, this specific execution order accelerates the NVMe controller's interrupt generation. This leads to an interrupt storm: the overall interrupt count increases significantly, and each interrupt handles fewer CQEs. Consequently, a massive amount of CPU cycles are consumed by the fixed overhead of interrupt entry/exit rather than useful I/O processing, drastically degrading random read efficiency. Interrupt statistics were collected on a Hygon platform using a 10-second workload of 16 jobs with 4 KiB random reads: With batching: average IOPS ~2.29M; interrupts per queue ~1.82M Without batching: average IOPS ~2.89M; interrupts per queue ~1.52M By restoring the single-completion fast path, the interrupt rate is reduced by ~16%, eliminating the interrupt storm. Performance results (fio 4k randread, 16 jobs) show significant improvements across various CPU pinning topologies: CPU Pinning | With Batching (kops) | This Patch (kops) | Improvement 0-15,128-143 | 1,747.9 | 2,053.9 | +17.5% 0-11,128-139 | 1,939.8 | 2,437.6 | +25.7% 0-7,128-135 | 2,341.9 | 2,891.3 | +23.5% 0-15 | 1,754.1 | 2,018.6 | +15.1% 0-11 | 2,051.2 | 2,510.5 | +22.4% It is worth noting that this issue is not necessarily exclusive to Hygon CPUs. Architectures with higher interrupt latency or lower overall performance characteristics may also suffer from similar regressions, where the overhead of the batching fast path outweighs the benefit of amortizing the doorbell write. Instead of hardcoding a permanent revert, introduce a flag 'use_comp_batch' and disable IRQ completion batching if running on a Hygon CPU. This preserves the performance benefits for platforms that favor batching while restoring the optimal single-completion fast path for Hygon, and provides a scalable mechanism to disable it on other affected platforms in the future. Fixes: 4f50224 ("nvme: wire up completion batching for the IRQ path") Signed-off-by: Liao Xuan <liaoxuan@open-hieco.net>
Author
|
Upstream branch: de52810 |
ghost
force-pushed
the
series/1199835=>for-next
branch
from
November 10, 2026 10:27
7ecd629 to
32479dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: nvme-pci: Fix performance regression with completion batching for Hygon processors
version: 1
url: https://patchwork.kernel.org/series/1199835/