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