]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: disable printk ratelimit in early boot
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Sep 2019 19:02:07 +0000 (21:02 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Sep 2019 14:05:53 +0000 (16:05 +0200)
commit6123dfaa72589735c3e8e9b9b9e075a287f523ab
treec4944794d39c49e3bf2d91c1378f9c1ba8fea849
parent5ac1530eca652cd16819853fe06e76e156f5cf5e
pid1: disable printk ratelimit in early boot

We have the problem that many early boot or late shutdown issues are harder
to solve than they could be because we have no logs. When journald is not
running, messages are redirected to /dev/kmsg. It is also the time when many
things happen in a rapid succession, so we tend to hit the kernel printk
ratelimit fairly reliably. The end result is that we get no logs from the time
where they would be most useful. Thus let's disable the kernels ratelimit.

Once the system is up and running, the ratelimit is not a problem. But during
normal runtime, things also log to journald, and not to /dev/kmsg, so the
ratelimit is not useful. Hence, there doesn't seem to be much point in trying
to restore the ratelimit after boot is finished and journald is up and running.

See kernel's commit 750afe7babd117daabebf4855da18e4418ea845e for the
description of the kenrel interface. Our setting has lower precedence than
explicit configuration on the kenrel command line.
src/core/main.c
src/core/manager.c
src/core/manager.h