Re: [v7 2/5] mm, oom: cgroup-aware OOM killer

From: Christopher Lameter
Date: Thu Sep 07 2017 - 12:18:26 EST


On Mon, 4 Sep 2017, Roman Gushchin wrote

> To address these issues, cgroup-aware OOM killer is introduced.

You are missing a major issue here. Processes may have allocation
constraints to memory nodes, special DMA zones etc etc. OOM conditions on
such resource constricted allocations need to be dealt with. Killing
processes that do not allocate with the same restrictions may not do
anything to improve conditions.

> But a user can change this behavior by enabling the per-cgroup
> oom_kill_all_tasks option. If set, it causes the OOM killer treat
> the whole cgroup as an indivisible memory consumer. In case if it's
> selected as on OOM victim, all belonging tasks will be killed.

Sounds good in general. Unless the cgroup or processes therein run out of
memory due to memory access restrictions. How do you detect that and how
it is handled?