Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677541

Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom victim selection

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom victim selection
Date 2017-06-29 11:10 +0200
Message-ID <tXDCy-5Ff-23@gated-at.bofh.it> (permalink)
References <tVh3s-18t-9@gated-at.bofh.it> <tVh3s-18t-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 21-06-17 22:19:11, Roman Gushchin wrote:
> Oom killer should avoid unnecessary kills. To prevent them, during
> the tasks list traverse we check for task which was previously
> selected as oom victims. If there is such a task, new victim
> is not selected.
> 
> This approach is sub-optimal (we're doing costly iteration over the task
> list every time) and will not work for the cgroup-aware oom killer.
> 
> We already have oom_victims counter, which can be effectively used
> for the task.

A global counter will not work properly, I am afraid. a) you should
consider the oom domain and do not block oom on unrelated domains and b)
you have no guarantee that the oom victim will terminate reasonably.
That is why we have MMF_OOM_SKIP check in oom_evaluate_task.

I think you should have something similar for your memcg victim selection.
If you see a memcg in the oom hierarchy with oom victims which are alive
and not MMF_OOM_SKIP, you should abort the scanning.
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom  victim selection Michal Hocko <mhocko@kernel.org> - 2017-06-29 11:10 +0200

csiph-web