Re: [PATCH v2 2/2] mm, memcg: don't try to kill a process if memcg is not populated

Michal Hocko
2020-05-04T16:11:18Z

On Mon 04-05-20 23:24:35, Yafang Shao wrote:
> On Mon, May 4, 2020 at 8:46 PM Michal Hocko <mhocko@kernel.org> wrote:
[...]
> > But the oom situation and the oom report is simply something an admin
> > has to expect especially when the hard limit is set to 0. With kmem
> > accounting there is no guarantee that the target will be met.
>
> I'm always wondering that why not moving the kmem from this memcg to
> the root_mem_cgroup in this situation ?
> Then this memcg can be easily reclaimed.

Roman was playing with kmem charges reparenting. But please note that
this alone would be sufficient. Even LRU pages are not guaranteed to be
reclaimable - think of the full swap space, memory might be pinned etc.

--
Michal Hocko
SUSE Labs