[libvirt] [PATCH V2] qemu: Redefine the "unlimited" memory limits one more time

Viktor Mihajlovski mihajlov at linux.vnet.ibm.com
Fri Nov 25 14:19:54 UTC 2016


On 18.11.2016 17:44, Viktor Mihajlovski wrote:
> With kernel 3.18 (since commit 3e32cb2e0a12b6915056ff04601cf1bb9b44f967) the
> "unlimited" value for cgroup memory limits has changed once again as its byte
> value is now computed from a page counter.
> The new "unlimited" value reported by the cgroup fs is therefore 2**51-1 pages
> which is (VIR_DOMAIN_MEMORY_PARAM_UNLIMITED - 3072). This results e.g. in virsh
> memtune displaying 9007199254740988 instead of unlimited for the limits.
> 
> This patch deals with the rounding issue by scaling the byte values reported
> by the kernel and the PARAM_UNLIMITED value to page size and comparing those.
> 
> See also libvirt commit 231656bbeb9e4d3bedc44362784c35eee21cf0f4 for the
> history for kernel 3.12 and before.
> 
> 

ping ... it would be nice if this or an equivalent patch (comparison on
4k boundaries) could be applied. Besides causing the goofy virsh memtune
output, this breaks applications that compare current limits against
VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.

Thanks!

-- 

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294




More information about the libvir-list mailing list