Re: [RFC][PATCH] printk: increase devkmsg write() ratelimit

From: Peter Zijlstra
Date: Tue Dec 18 2018 - 05:48:28 EST


On Tue, Dec 18, 2018 at 06:18:42PM +0900, Sergey Senozhatsky wrote:
> Hello,
>
> RFC
>
> A painful subject:
>
> I just noticed that stock systemd (no systemd debugging enabled) on my
> x86 box write()-s during shutdown to devkmsg more than before, so old
> devkmsg ratelimits do not apply:
>
> $ sudo journalctl -n 40000 -f | grep "kernel: printk: systemd-shutdow"
> kernel: printk: systemd-shutdow: 35 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 31 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 35 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 36 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 36 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 36 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 36 output lines suppressed due to ratelimiting
> kernel: printk: systemd-shutdow: 35 output lines suppressed due to ratelimiting
>
> I know that there is a "kernel.printk_devkmsg" interface; do we
> expect every systemd-enabled distro to find that out and to tweak
> kernel.printk_devkmsg or shall we change the default devkmsg
> ratelimit instead?

How about we complain to systemd instead?