Currently kdump service is restarted even when any new file is added in cpu
subsystem. So, it can be restarted multiple times in the cases like loading
of acpi_cpufreq module or online/offline of any cpu.
However, we should see kdump service restart only once in case a new CPU
is added or removed. cpu crash notes buffer is created when a new CPU is
added. It's location does not change when a CPU is onlined/offlined or
acpi_cpufreq driver is loaded. Therefore, no need to restart kdump
service in such cases.
IMO, there is only one processor driver (drivers/acpi/processor_core.c) which
can enumerate a hot added cpu. An `udevadm info` enquiry to acpi device created
by this driver gives:
# udevadm info -a -p /sys/bus/acpi/devices/LNXCPU\:00/
looking at device
'/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0010:00/LNXCPU:00':
KERNEL=="LNXCPU:00"
SUBSYSTEM=="acpi"
Therefore, this patch modifies the rule to filter such devices.
Signed-off-by: Pratyush Anand <panand(a)redhat.com>
---
98-kexec.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/98-kexec.rules b/98-kexec.rules
index e32ee13cb2e8..d43760e38f8f 100644
--- a/98-kexec.rules
+++ b/98-kexec.rules
@@ -1,4 +1,4 @@
-SUBSYSTEM=="cpu", ACTION=="add", PROGRAM="/bin/systemctl
try-restart kdump.service"
-SUBSYSTEM=="cpu", ACTION=="remove", PROGRAM="/bin/systemctl
try-restart kdump.service"
+SUBSYSTEM=="acpi", ACTION=="add", KERNEL=="LNXCPU*",
PROGRAM="/etc/init.d/kdump condrestart"
+SUBSYSTEM=="acpi", ACTION=="remove", KERNEL=="LNXCPU*",
PROGRAM="/etc/init.d/kdump condrestart"
SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/bin/systemctl
try-restart kdump.service"
SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/bin/systemctl
try-restart kdump.service"
--
2.9.4
Show replies by date