[libvirt PATCH 4/7] qemu_migration: Don't set unlimited memlock limit for RDMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Our documentation says RDMA migration requires hard_limit to be set so
that we know how big memory locking limit should be set for the domain
during migration. But since commit v1.2.13-71-gcf521fc8ba (which changed
the default hard_limit value from 0 to
VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) we were actually setting memlock
limit to unlimited if hard_limit was not set.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index ffae5576d2..272f1b1b59 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3180,7 +3180,7 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver,
     }
 
     if (STREQ_NULLABLE(protocol, "rdma") &&
-        vm->def->mem.hard_limit > 0 &&
+        virMemoryLimitIsSet(vm->def->mem.hard_limit) &&
         qemuDomainSetMaxMemLock(vm, vm->def->mem.hard_limit << 10,
                                 &priv->preMigrationMemlock) < 0) {
         goto error;
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux