mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 07:22:07 +03:00
Add functions to set/get cgroup cpuset parameters
This commit is contained in:
parent
4e394dea1f
commit
059425ae45
@ -78,6 +78,7 @@ virCgroupGetCpuShares;
|
||||
virCgroupGetCpuCfsPeriod;
|
||||
virCgroupGetCpuCfsQuota;
|
||||
virCgroupGetCpuacctUsage;
|
||||
virCgroupGetCpusetMems;
|
||||
virCgroupGetFreezerState;
|
||||
virCgroupGetMemoryHardLimit;
|
||||
virCgroupGetMemorySoftLimit;
|
||||
@ -94,6 +95,7 @@ virCgroupSetBlkioWeight;
|
||||
virCgroupSetCpuShares;
|
||||
virCgroupSetCpuCfsPeriod;
|
||||
virCgroupSetCpuCfsQuota;
|
||||
virCgroupSetCpusetMems;
|
||||
virCgroupSetFreezerState;
|
||||
virCgroupSetMemory;
|
||||
virCgroupSetMemoryHardLimit;
|
||||
|
@ -1204,6 +1204,38 @@ int virCgroupGetMemSwapHardLimit(virCgroupPtr group, unsigned long long *kb)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* virCgroupSetCpusetMems:
|
||||
*
|
||||
* @group: The cgroup to set cpuset.mems for
|
||||
* @mems: the numa nodes to set
|
||||
*
|
||||
* Returns: 0 on success
|
||||
*/
|
||||
int virCgroupSetCpusetMems(virCgroupPtr group, const char *mems)
|
||||
{
|
||||
return virCgroupSetValueStr(group,
|
||||
VIR_CGROUP_CONTROLLER_CPUSET,
|
||||
"cpuset.mems",
|
||||
mems);
|
||||
}
|
||||
|
||||
/**
|
||||
* virCgroupGetCpusetMems:
|
||||
*
|
||||
* @group: The cgroup to get cpuset.mems for
|
||||
* @mems: the numa nodes to get
|
||||
*
|
||||
* Returns: 0 on success
|
||||
*/
|
||||
int virCgroupGetCpusetMems(virCgroupPtr group, char **mems)
|
||||
{
|
||||
return virCgroupGetValueStr(group,
|
||||
VIR_CGROUP_CONTROLLER_CPUSET,
|
||||
"cpuset.mems",
|
||||
mems);
|
||||
}
|
||||
|
||||
/**
|
||||
* virCgroupDenyAllDevices:
|
||||
*
|
||||
|
@ -119,6 +119,9 @@ int virCgroupGetCpuacctUsage(virCgroupPtr group, unsigned long long *usage);
|
||||
int virCgroupSetFreezerState(virCgroupPtr group, const char *state);
|
||||
int virCgroupGetFreezerState(virCgroupPtr group, char **state);
|
||||
|
||||
int virCgroupSetCpusetMems(virCgroupPtr group, const char *mems);
|
||||
int virCgroupGetCpusetMems(virCgroupPtr group, char **mems);
|
||||
|
||||
int virCgroupRemove(virCgroupPtr group);
|
||||
|
||||
void virCgroupFree(virCgroupPtr *group);
|
||||
|
Loading…
Reference in New Issue
Block a user