Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/vircgroupv2.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index e0fa8e1cc0..4cfbd52f2d 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -1561,6 +1561,28 @@ virCgroupV2GetCpuacctStat(virCgroupPtr group,
}
+static int
+virCgroupV2SetCpusetMems(virCgroupPtr group,
+ const char *mems)
+{
+ return virCgroupSetValueStr(group,
+ VIR_CGROUP_CONTROLLER_CPUSET,
+ "cpuset.mems",
+ mems);
+}
+
+
+static int
+virCgroupV2GetCpusetMems(virCgroupPtr group,
+ char **mems)
+{
+ return virCgroupGetValueStr(group,
+ VIR_CGROUP_CONTROLLER_CPUSET,
+ "cpuset.mems",
+ mems);
+}
+
+
virCgroupBackend virCgroupV2Backend = {
.type = VIR_CGROUP_BACKEND_TYPE_V2,
@@ -1620,6 +1642,9 @@ virCgroupBackend virCgroupV2Backend = {
.getCpuacctUsage = virCgroupV2GetCpuacctUsage,
.getCpuacctStat = virCgroupV2GetCpuacctStat,
+
+ .setCpusetMems = virCgroupV2SetCpusetMems,
+ .getCpusetMems = virCgroupV2GetCpusetMems,
};
--
2.20.1