Collin Funk wrote: > Given that physmem doesn't account for cgroups though, 'sort' may > allocate more than allowed by a cgroup, leading to a process being > killed. > ... > I think that it would be nice to account for cgroup memory limits here
Sounds fine for physmem_available and physmem_claimable. For physmem_total, I'm not sure. It is defined as "the total amount of physical memory". So, either - leave physmem_total as it is, or - invent a new function physmem_in_container, - or add a 'bool in_container' parameter to physmem_total. Bruno
