ab7a78
From 9e5559fb4056507ecfc5e7dd758c3837283feb39 Mon Sep 17 00:00:00 2001
ab7a78
Message-Id: <9e5559fb4056507ecfc5e7dd758c3837283feb39@dist-git>
ab7a78
From: Michal Privoznik <mprivozn@redhat.com>
ab7a78
Date: Wed, 28 Sep 2022 10:12:36 +0200
ab7a78
Subject: [PATCH] qemuProcessReconnect: Don't build memory paths
ab7a78
MIME-Version: 1.0
ab7a78
Content-Type: text/plain; charset=UTF-8
ab7a78
Content-Transfer-Encoding: 8bit
ab7a78
ab7a78
Let me take you on a short trip to history. A long time ago,
ab7a78
libvirt would configure all QEMUs to use $hugetlbfs/libvirt/qemu
ab7a78
for their hugepages setup. This was problematic, because it did
ab7a78
not allow enough separation between guests. Therefore in
ab7a78
v3.0.0-rc1~367 the path changed to a per-domain basis:
ab7a78
ab7a78
  $hugetlbfs/libvirt/qemu/$domainShortName
ab7a78
ab7a78
And to help with migration on daemon restart a call to
ab7a78
qemuProcessBuildDestroyMemoryPaths() was added to
ab7a78
qemuProcessReconnect() (well, it was named
ab7a78
qemuProcessBuildDestroyHugepagesPath() back then, see
ab7a78
v3.10.0-rc1~174). This was desirable then, because the memory
ab7a78
hotplug code did not call the function, it simply assumes
ab7a78
per-domain paths to exist. But this changed in v3.5.0-rc1~92
ab7a78
after which the per-domain paths are created on memory hotplug
ab7a78
too.
ab7a78
ab7a78
Therefore, it's no longer necessary to create these paths in
ab7a78
qemuProcessReconnect(). They are created exactly when needed
ab7a78
(domain startup and memory hotplug).
ab7a78
ab7a78
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ab7a78
Reviewed-by: Ján Tomko <jtomko@redhat.com>
ab7a78
(cherry picked from commit 3478cca80ea7382cfdbff836d5d0b92aa014297b)
ab7a78
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2132177
ab7a78
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ab7a78
---
ab7a78
 src/qemu/qemu_process.c | 3 ---
ab7a78
 1 file changed, 3 deletions(-)
ab7a78
ab7a78
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
ab7a78
index 1164340aa9..0fb665bc82 100644
ab7a78
--- a/src/qemu/qemu_process.c
ab7a78
+++ b/src/qemu/qemu_process.c
ab7a78
@@ -8869,9 +8869,6 @@ qemuProcessReconnect(void *opaque)
ab7a78
         goto cleanup;
ab7a78
     }
ab7a78
 
ab7a78
-    if (qemuProcessBuildDestroyMemoryPaths(driver, obj, NULL, true) < 0)
ab7a78
-        goto error;
ab7a78
-
ab7a78
     if ((qemuDomainAssignAddresses(obj->def, priv->qemuCaps,
ab7a78
                                    driver, obj, false)) < 0) {
ab7a78
         goto error;
ab7a78
-- 
ab7a78
2.37.2
ab7a78