Re: [PATCH 3/8] qemu: Fix memory locking limit calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 27, 2017 at 03:17:12PM +0200, Andrea Bolognani wrote:
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 :)


Well, honestly, then I feel really bad about forcing people do different
choices and changing it between releases.  I don't think anyone wants to
be checking all documentation changes every release.  But since there
are only two releases with the patch being in, it's probably okay.  But
I would *at least* be nice to mention that the lock limit is on it's way
to the XML.

-- 
Andrea Bolognani / Red Hat / Virtualization

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux