mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
qemu: Replace Mlock with MemLock in function names
MemLock is already used in other modules and, while still an abbreviation, is not ambiguous.
This commit is contained in:
parent
afbe1d4c56
commit
242e3ea4e3
@ -11287,8 +11287,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
|
|
||||||
/* In some situations, eg. VFIO passthrough, QEMU might need to lock a
|
/* In some situations, eg. VFIO passthrough, QEMU might need to lock a
|
||||||
* significant amount of memory, so we need to set the limit accordingly */
|
* significant amount of memory, so we need to set the limit accordingly */
|
||||||
if (qemuDomainRequiresMlock(def))
|
if (qemuDomainRequiresMemLock(def))
|
||||||
virCommandSetMaxMemLock(cmd, qemuDomainGetMlockLimitBytes(def));
|
virCommandSetMaxMemLock(cmd, qemuDomainGetMemLockLimitBytes(def));
|
||||||
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MSG_TIMESTAMP) &&
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MSG_TIMESTAMP) &&
|
||||||
cfg->logTimestamp)
|
cfg->logTimestamp)
|
||||||
|
@ -3964,7 +3964,7 @@ qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qemuDomainGetMlockLimitBytes:
|
* qemuDomainGetMemLockLimitBytes:
|
||||||
*
|
*
|
||||||
* @def: domain definition
|
* @def: domain definition
|
||||||
*
|
*
|
||||||
@ -3974,7 +3974,7 @@ qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
|
|||||||
* value returned may depend upon the architecture or devices present.
|
* value returned may depend upon the architecture or devices present.
|
||||||
*/
|
*/
|
||||||
unsigned long long
|
unsigned long long
|
||||||
qemuDomainGetMlockLimitBytes(virDomainDefPtr def)
|
qemuDomainGetMemLockLimitBytes(virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
unsigned long long memKB;
|
unsigned long long memKB;
|
||||||
|
|
||||||
@ -4095,7 +4095,7 @@ qemuDomainGetMlockLimitBytes(virDomainDefPtr def)
|
|||||||
* requirements.
|
* requirements.
|
||||||
* */
|
* */
|
||||||
bool
|
bool
|
||||||
qemuDomainRequiresMlock(virDomainDefPtr def)
|
qemuDomainRequiresMemLock(virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
@ -4138,7 +4138,7 @@ qemuDomainAdjustMaxMemLock(virDomainObjPtr vm)
|
|||||||
unsigned long long bytes = 0;
|
unsigned long long bytes = 0;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (qemuDomainRequiresMlock(vm->def)) {
|
if (qemuDomainRequiresMemLock(vm->def)) {
|
||||||
/* If this is the first time adjusting the limit, save the current
|
/* If this is the first time adjusting the limit, save the current
|
||||||
* value so that we can restore it once memory locking is no longer
|
* value so that we can restore it once memory locking is no longer
|
||||||
* required. Failing to obtain the current limit is not a critical
|
* required. Failing to obtain the current limit is not a critical
|
||||||
@ -4147,7 +4147,7 @@ qemuDomainAdjustMaxMemLock(virDomainObjPtr vm)
|
|||||||
if (virProcessGetMaxMemLock(vm->pid, &(vm->original_memlock)) < 0)
|
if (virProcessGetMaxMemLock(vm->pid, &(vm->original_memlock)) < 0)
|
||||||
vm->original_memlock = 0;
|
vm->original_memlock = 0;
|
||||||
}
|
}
|
||||||
bytes = qemuDomainGetMlockLimitBytes(vm->def);
|
bytes = qemuDomainGetMemLockLimitBytes(vm->def);
|
||||||
} else {
|
} else {
|
||||||
/* Once memory locking is no longer required, we can restore the
|
/* Once memory locking is no longer required, we can restore the
|
||||||
* original, usually very low, limit */
|
* original, usually very low, limit */
|
||||||
|
@ -498,8 +498,8 @@ bool qemuDomainMachineHasBuiltinIDE(const virDomainDef *def);
|
|||||||
int qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
|
int qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
|
||||||
virDomainObjPtr vm);
|
virDomainObjPtr vm);
|
||||||
|
|
||||||
unsigned long long qemuDomainGetMlockLimitBytes(virDomainDefPtr def);
|
unsigned long long qemuDomainGetMemLockLimitBytes(virDomainDefPtr def);
|
||||||
bool qemuDomainRequiresMlock(virDomainDefPtr def);
|
bool qemuDomainRequiresMemLock(virDomainDefPtr def);
|
||||||
int qemuDomainAdjustMaxMemLock(virDomainObjPtr vm);
|
int qemuDomainAdjustMaxMemLock(virDomainObjPtr vm);
|
||||||
|
|
||||||
int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user