Re: [RFC] should physmem be cgroup-aware?

Bruno Haible via Gnulib discussion list <[email protected]>
Newsgroups gmane.comp.lib.gnulib.bugs
Message-ID <3391434.GVIIzDoMMc@cagnes>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.