systemd/SOURCES/1002-udev-rules-fix-for-mem...

39 lines
1.2 KiB
Diff

From 4dd615f7727cfc52f9b6b3c7f88425631326477f Mon Sep 17 00:00:00 2001
From: Aleksandr Burmashev <alexander.burmashev@oracle.com>
Date: Fri, 4 Feb 2022 13:12:14 +0100
Subject: udev rules: fix for memory hot add and remove
This patch allows hot added memory for kvm guests to be
onlined as 'online_movable', thus facilitating removal
of the same hot added memory at a later point in time.
The use of 'online_movable' prevents kernel allocations
from occuring within the memory. Kernel allocations
tend to be persistent, and thus prevent removal of
memory.
Orabug: 31310273
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
Reviewed-by: Tony Rodriguez <tony.rodriguez@oracle.com>
Reviewed-by: Laurence Rochfort <laurence.rochfort@oracle.com>
---
rules.d/40-redhat.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules.d/40-redhat.rules b/rules.d/40-redhat.rules
index 3c95cd2..43c8ab4 100644
--- a/rules.d/40-redhat.rules
+++ b/rules.d/40-redhat.rules
@@ -11,6 +11,7 @@ CONST{arch}=="ppc64*", GOTO="memory_hotplug_end"
ENV{.state}="online"
CONST{virt}=="none", ENV{.state}="online_movable"
+CONST{virt}=="kvm", ENV{.state}="online_movable"
ATTR{state}=="offline", ATTR{state}="$env{.state}"
LABEL="memory_hotplug_end"
--
2.27.0