Re: [PATCH v4 2/4] mm/oom: handle remote ooms
From: Matthew Wilcox <hidden>
Date: 2021-11-20 05:07:31
Also in:
linux-fsdevel, linux-mm, lkml
From: Matthew Wilcox <hidden>
Date: 2021-11-20 05:07:31
Also in:
linux-fsdevel, linux-mm, lkml
On Fri, Nov 19, 2021 at 08:50:08PM -0800, Mina Almasry wrote:
On remote ooms (OOMs due to remote charging), the oom-killer will attempt to find a task to kill in the memcg under oom. The oom-killer may be unable to find a process to kill if there are no killable processes in the remote memcg. In this case, the oom-killer (out_of_memory()) will return false, and depending on the gfp, that will generally get bubbled up to mem_cgroup_charge_mapping() as an ENOMEM.
Why doesn't it try to run the shrinkers to get back some page cache / slab cache memory from this memcg? I understand it might not be able to (eg if the memory is mlocked), but surely that's rare.