On Tue, Feb 16, 2016 at 12:59:25PM +0300, Konstantin Khorenko wrote: > On 02/09/2016 03:54 PM, Andrey Ryabinin wrote: > > > > > >On 12/04/2015 08:16 PM, Vasily Averin wrote: > >>Customer reports that free or top command inside Centos7 CT shows 0 memory > >>used > >> > >>free from procps-ng-3.3.10-3.el7 uses /proc/meminfo output and calculates > >>used = total - free - buffers - cache - slab > >> > >>However kernel in some cases calculates "Cached" value in meminfo output by > >>using > >>the same formula: > >>cached = total - free - slab (where buffers = 0) > > > >So this is the actual problem. Whenever we use that formula the used > >calculated as > > used = total - free - buffers - cached - slab > >means that > > used = -buffers > >And the patch do nothing about this. We still could get the this situation. > > > >> > >>Alternative calculation of cached value does not work this time becasue > >>additional UB_SHMPAGES.held argument added to work-around > >>"negative cached" problem in previous version of free/procps-ng > >>see PSBM-29352 and http://kb.sp.parallels.com/en/123422 > >> > > > >It's not work-around, it's a correct bugfix. Shmem pages are accounted as > >"Cached". > >So just removing it would make "Cached" value incorrect again. > > > >Probably we could solve this by reading 'cached' value from memcg stats > >(mem_cgroup_read_stat()). > > Volodya, your opinion?
I think it's a good idea. _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel