On 10/30/18 at 06:48pm, Kairui Song wrote:
Currently kdump will restart for multiple times and may trigger a
initramfs rebuild on memory / CPU hotplug if any configuration is
modified. Besides, currently simply restart the service via systemctl
directly will take a period of time as well, as kdumpctl will do a lot
of config checking, which is not appreciated by udev, udev want
everything to get done in a very short time.
And kdumpctl may get kill for several times because systemd will kill
the previous service starting process for later restart request. This
may introduce extra risk too.
Simply add reload support and use systemdctl reload will not work well
either because systemd will ignore later reload request, so kdump may
get reload earlier than the hotplug is finished.
This patch series should solve the problem by applying following fixes:
- Adding reload support as a fast path to reload kdump resources,
bypassing most checking. So the reload progress will be faster
and never trigger a initrmafs rebuild.
- Let the reload request run in async mode, so udev will never
- Throttle udev events to avoid unnecessary kdump reloading
and make sure kdump will reload after the udev settled.
Update from V2:
- Use "-ne" instead of "!=" for comparing return values of
in kdumpctl. "!=" is used more for pattern matching.
- Removed duplicated "is-system-running" check in kdump-udev-throttler
- Add more detailed commit message about reason to use --no-block in
Update from V1:
- Add cover letter
- Add --no-block option to systemd-run, starting from systemd-v220,
systemd-run will run in synchronous mode by default, need to give
--no-block explicitly to run in async mode.
Kairui Song (3):
kdumpctl: Add reload support
Rewrite kdump's udev rules
Throttle kdump reload request triggered by udev event
98-kexec.rules | 16 +++++++++---
kdump-udev-throttler | 47 +++++++++++++++++++++++++++++++++++
kdump.service | 1 +
kdumpctl | 59 +++++++++++++++++++++++++++++++++++++-------
kexec-tools.spec | 3 +++
5 files changed, 113 insertions(+), 13 deletions(-)
create mode 100755 kdump-udev-throttler