[PATCH] nvme: ratelimit the completion-path messages driven by device data
Chris S
coshi036 at gmail.com
Tue Aug 11 10:26:42 PDT 2026
Thank you so much! I will take care of the later patch submission; avoid
long lines. Appreciate!
On Tue, Aug 11, 2026 at 1:07 PM Keith Busch <kbusch at kernel.org> wrote:
>
> On Mon, Aug 10, 2026 at 06:02:58PM -0400, Chao Shi wrote:
> > nvme_find_rq() and nvme_handle_cqe() print an unratelimited message for
> > every completion queue entry whose command id does not resolve to an
> > in-flight request. Both are reached from the completion interrupt path
> > (nvme_irq() -> nvme_poll_cq() -> nvme_handle_cqe()) and the decision to
> > print is made entirely from device-supplied data, so a controller that
> > posts a stream of bogus command ids drives unbounded printk from hard
> > interrupt context.
>
> Yeah, if a controller is so badly malfunctioning that only garbage is
> getting posted to the completion queues, then we don't really get any
> more information by dumping every single instance compared to rate
> limiting it. So applied to nvme-7.3, but with a minor fix to an overly
> long line.
More information about the Linux-nvme
mailing list