Re: [PATCH] printk: fold consecutive duplicate messages
From: John Ogness
Date: Mon Sep 21 2026 - 03:54:37 EST
Hi,
On 2026-09-21, 林濬哲 <m18667909625@xxxxxxx> wrote:
> A kernel bug can flood the console with thousands of copies of the
> same message, drowning out everything else. Fold consecutive
> duplicates into a single "last message repeated N times" summary,
> flushed when 10 repeats accumulate or a 1s window elapses.
Do you have an example of the _same_ message flooding the console? This
does not sound like a real-world case.
> Known limitation: dedup_lock is not NMI safe; a message from NMI
> context while another CPU holds the lock will spin.
printk _is_ NMI safe _and_ lockless. It needs to stay that way.
John Ogness