On Mon, 2017-03-27 at 14:24 +0200, Martin Kletzander wrote:
[...]
> @@ -6220,10 +6220,13 @@
qemuDomainGetMemLockLimitBytes(virDomainDefPtr def)
> goto done;
> }
>
> - if (def->mem.locked) {
> - memKB = virDomainDefGetMemoryTotal(def) + 1024 * 1024;
> - goto done;
> - }
> + /* If the guest wants its memory to be locked, we need to raise the memory
> + * locking limit so that the OS will not refuse allocation requests;
> + * however, there is no reliable way for us to figure out how much memory
> + * the QEMU process will allocate for its own use, so our only way out is
> + * to remove the limit altogether. Use with extreme care */
> + if (def->mem.locked)
> + return VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
So there is no way how one can limit the size of the memlock, other than
setting the hard limit?
Correct.
Are you planning on adding new element to the
domain XML which would allow setting this number as well?
I do. Unless I forget about it again, of course :)
--
Andrea Bolognani / Red Hat / Virtualization