From e8f71f38d51a912c816a2a38476092aa05718511 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Fri, 2 May 2014 10:28:50 -0400 Subject: [PATCH] Fix kdump udev memory event restarts During debugging of another problem issues were noted with the kdump udev rules. The kdump service is restarted on memory add and remove events. These are the wrong events for these types of devices and result in an overly aggressive restarting of the kdump service. There are four udev events to consider, "add", "remove", "online", and "offline". The remove event is a complete removal from the system -- neither the hardware nor the kernel know about the hardware; it has been physically removed. The add event is associated with hardware being physically added to the system. The kernel has some limited knowledge of the device, however, it is not avaiable for the kernel to use until it is brought online. Online events refer to the device being available for the kernel to use. Opposite to that is the offline event, which occurs when a device is no longer in use by the kernel. Note that in all four events the kernel *may* have some remaining information stored about the device. In the case of memory hotplug, kdump should be restarted when a memory module is onlined or offlined. This is because the memory is not in use by the kernel until the memory is onlined, and it is unused when the memory is offlined. Making these modifications results in smooth service on systems that do heavy memory onlining and offlining. Cc: Vivek Goyal Signed-off-by: Prarit Bhargava Acked-by: Vivek Goyal --- 98-kexec.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/98-kexec.rules b/98-kexec.rules index 8c742dd..162260d 100644 --- a/98-kexec.rules +++ b/98-kexec.rules @@ -1,4 +1,4 @@ SUBSYSTEM=="cpu", ACTION=="online", PROGRAM="/bin/systemctl try-restart kdump.service" SUBSYSTEM=="cpu", ACTION=="offline", PROGRAM="/bin/systemctl try-restart kdump.service" -SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/bin/systemctl try-restart kdump.service" -SUBSYSTEM=="memory", ACTION=="remove", PROGRAM="/bin/systemctl try-restart kdump.service" +SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/bin/systemctl try-restart kdump.service" +SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/bin/systemctl try-restart kdump.service"