a585f981bd
On powerpc, after hot add cpu and trigger crash on the hot-added cpu, the kdump kernel hangs after "I'm in purgatory". The current udev rules expects the dtb to be rebuit on cpu add/remove event. But since powerpc does not follow the standard cpu hot add framework, it only ejects online/offline event to user space when cpu is hot added/removed, instead of add/remove event. Pingfan tried fixing that but it didn't please the maintainer as it breaks some old userspace tools. Due to the failure of dtb's rebuilding, KDump kernel fails to get the 'boot_cpuid' and eventually fails to boot [see early_init_dt_scan_cpus() in arch/powerpc/kernel/prom.c file] if system crashes on hot-added CPU. Work around it by changing udev rules on powerpc to onlne/offline. As for offline message, it is even useless on powerpc, and can be dropped. See the explain: On powerpc, /sys/devices/system/cpu/cpuX nodes are present for all "possible", irrespective of whether a CPU is hot-added/removed. crash_notes are already built for all /sys/devices/system/cpu/cpuX nodes and these nodes are present for all "possible" CPUs (online/offline/could-be-hot-removed/could-be-hot-added) Signed-off-by: Pingfan Liu <piliu@redhat.com> Acked-by: Kairui Song <kasong@redhat.com>
16 lines
642 B
Plaintext
16 lines
642 B
Plaintext
SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_reload"
|
|
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload"
|
|
SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload"
|
|
|
|
GOTO="kdump_reload_end"
|
|
|
|
LABEL="kdump_reload"
|
|
|
|
# If kdump is not loaded, calling kdump-udev-throttle will end up
|
|
# doing nothing, but systemd-run will always generate extra logs for
|
|
# each call, so trigger the kdump-udev-throttler only if kdump
|
|
# service is active to avoid unnecessary logs
|
|
RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
|
|
|
|
LABEL="kdump_reload_end"
|