[PATCH] nvme-pci: Fix performance regression with completion batching for Hygon processors

Christoph Hellwig hch at lst.de
Fri Nov 6 02:54:34 PST 2026


On Tue, Nov 03, 2026 at 02:32:49PM +0800, Liao Xuan wrote:
> Commit 4f5022453acd ("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

Why?

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

No, these kinds of platform specific hacks do not belong into the
nvme driver.




More information about the Linux-nvme mailing list