|
|
c313de |
From 0cde517cd560d47824e0e98fab32b62cbd0f89ea Mon Sep 17 00:00:00 2001
|
|
|
c313de |
Message-Id: <0cde517cd560d47824e0e98fab32b62cbd0f89ea@dist-git>
|
|
|
c313de |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c313de |
Date: Mon, 1 Jul 2019 17:08:12 +0200
|
|
|
c313de |
Subject: [PATCH] util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate
|
|
|
c313de |
MIME-Version: 1.0
|
|
|
c313de |
Content-Type: text/plain; charset=UTF-8
|
|
|
c313de |
Content-Transfer-Encoding: 8bit
|
|
|
c313de |
|
|
|
c313de |
Cgroups v2 don't have memory_migrate interface and the migration is
|
|
|
c313de |
enabled by default.
|
|
|
c313de |
|
|
|
c313de |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c313de |
(cherry picked from commit 77c1cf4da2f761a91756c09fa4fd37ae1802e650)
|
|
|
c313de |
|
|
|
c313de |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
|
c313de |
|
|
|
c313de |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c313de |
Message-Id: <b9de5444564a4e6f74c31c6b360e83879c451272.1561993100.git.phrdina@redhat.com>
|
|
|
c313de |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c313de |
---
|
|
|
c313de |
src/util/vircgroupv2.c | 19 +++++++++++++++++++
|
|
|
c313de |
1 file changed, 19 insertions(+)
|
|
|
c313de |
|
|
|
c313de |
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
|
|
|
c313de |
index 59b8c4ad2c..bc6ced2367 100644
|
|
|
c313de |
--- a/src/util/vircgroupv2.c
|
|
|
c313de |
+++ b/src/util/vircgroupv2.c
|
|
|
c313de |
@@ -1584,6 +1584,23 @@ virCgroupV2GetCpusetMems(virCgroupPtr group,
|
|
|
c313de |
}
|
|
|
c313de |
|
|
|
c313de |
|
|
|
c313de |
+static int
|
|
|
c313de |
+virCgroupV2SetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED,
|
|
|
c313de |
+ bool migrate ATTRIBUTE_UNUSED)
|
|
|
c313de |
+{
|
|
|
c313de |
+ return 0;
|
|
|
c313de |
+}
|
|
|
c313de |
+
|
|
|
c313de |
+
|
|
|
c313de |
+static int
|
|
|
c313de |
+virCgroupV2GetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED,
|
|
|
c313de |
+ bool *migrate)
|
|
|
c313de |
+{
|
|
|
c313de |
+ *migrate = true;
|
|
|
c313de |
+ return 0;
|
|
|
c313de |
+}
|
|
|
c313de |
+
|
|
|
c313de |
+
|
|
|
c313de |
virCgroupBackend virCgroupV2Backend = {
|
|
|
c313de |
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
|
|
c313de |
|
|
|
c313de |
@@ -1646,6 +1663,8 @@ virCgroupBackend virCgroupV2Backend = {
|
|
|
c313de |
|
|
|
c313de |
.setCpusetMems = virCgroupV2SetCpusetMems,
|
|
|
c313de |
.getCpusetMems = virCgroupV2GetCpusetMems,
|
|
|
c313de |
+ .setCpusetMemoryMigrate = virCgroupV2SetCpusetMemoryMigrate,
|
|
|
c313de |
+ .getCpusetMemoryMigrate = virCgroupV2GetCpusetMemoryMigrate,
|
|
|
c313de |
};
|
|
|
c313de |
|
|
|
c313de |
|
|
|
c313de |
--
|
|
|
c313de |
2.22.0
|
|
|
c313de |
|