kexec-tools/0005-update-98-kexec-rules-for-crash-hotplug.patch
Lichen Liu 426b9269b8
Re apply upstream patches
We should use PatchXX to apply upstream kdump-utils
patches instead of directly merge them into git.

Resolves: RHEL-36415
Resolves: RHEL-37670
Upstream: https://github.com/rhkdump/kdump-utils/
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2024-06-11 11:05:24 +08:00

48 lines
1.9 KiB
Diff

From 659e0aae8f00570c85e82e1317153bf89e59929c Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Thu, 7 Sep 2023 10:37:20 -0500
Subject: [PATCH 5/7] update 98-kexec rules for crash hotplug
In kernel, with the support of cpu/memory hotplug on crash, kdump
reloading only needs to update the elfcorehdr.
To realize the benefits, we need prevent udev from updating kdump
kernel on hot un/plug changes when detecting that the crash_hotplug
sysfs nodes are present.
Link: https://lore.kernel.org/lkml/20230814214446.6659-1-eric.devolder@oracle.com/
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d68b4b6f307d155475cce541f2aee938032ed22e
Signed-off-by: Baoquan He <bhe@redhat.com>
---
98-kexec.rules | 4 ++++
98-kexec.rules.ppc64 | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/98-kexec.rules b/98-kexec.rules
index b73b701..52b2ee8 100644
--- a/98-kexec.rules
+++ b/98-kexec.rules
@@ -1,3 +1,7 @@
+# The kernel updates the crash elfcorehdr for CPU and memory changes
+SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
+SUBSYSTEM=="memory", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
+
SUBSYSTEM=="cpu", ACTION=="add", GOTO="kdump_reload"
SUBSYSTEM=="cpu", ACTION=="remove", GOTO="kdump_reload"
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload"
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64
index e9db276..e7735b3 100644
--- a/98-kexec.rules.ppc64
+++ b/98-kexec.rules.ppc64
@@ -1,3 +1,7 @@
+# The kernel updates the crash elfcorehdr for CPU and memory changes
+SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
+SUBSYSTEM=="memory", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
+
SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_reload_cpu"
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload_mem"
SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload_mem"
--
2.44.0