mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate
Cgroups v2 don't have memory_migrate interface and the migration is enabled by default. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
74e7da0605
commit
77c1cf4da2
@ -1583,6 +1583,23 @@ virCgroupV2GetCpusetMems(virCgroupPtr group,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virCgroupV2SetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED,
|
||||
bool migrate ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virCgroupV2GetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED,
|
||||
bool *migrate)
|
||||
{
|
||||
*migrate = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
virCgroupBackend virCgroupV2Backend = {
|
||||
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
||||
|
||||
@ -1645,6 +1662,8 @@ virCgroupBackend virCgroupV2Backend = {
|
||||
|
||||
.setCpusetMems = virCgroupV2SetCpusetMems,
|
||||
.getCpusetMems = virCgroupV2GetCpusetMems,
|
||||
.setCpusetMemoryMigrate = virCgroupV2SetCpusetMemoryMigrate,
|
||||
.getCpusetMemoryMigrate = virCgroupV2GetCpusetMemoryMigrate,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user