On Fri, Nov 25, 2016 at 04:35:14PM +0100, Martin Kletzander wrote: > 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. I guess I'm not understanding how this code copes with the fact that we now have 3 different "unlimited" values to deal with. Could we not simply record the unlimited values and pick the right one based on kernel version we detect ? Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list