On Fri, Nov 25, 2016 at 03:19:54PM +0100, Viktor Mihajlovski wrote:
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.
>
Ah, I wonder hoe many times we'll have to deal with this.
Anyway, this means it is not enough to shift by 2 if the system hugepage
is more than 4k (e.g. 2M). I remember we had to change something due to
such hosts. virGetSystemPageSize(KB) should help with that.
We could also make it 2^50 - pagesize just to make sure it will work for
a while, but some might not like it.
Also some comment for the condition would be nice to have for others
reading the code in the future.
> 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
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list