[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1708301349130.79465@chino.kir.corp.google.com>
Date: Wed, 30 Aug 2017 13:56:22 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Roman Gushchin <guro@...com>
cc: Michal Hocko <mhocko@...nel.org>, linux-mm@...ck.org,
Vladimir Davydov <vdavydov.dev@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Tejun Heo <tj@...nel.org>, kernel-team@...com,
cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [v6 2/4] mm, oom: cgroup-aware OOM killer
On Wed, 30 Aug 2017, Roman Gushchin wrote:
> I've spent some time to implement such a version.
>
> It really became shorter and more existing code were reused,
> howewer I've met a couple of serious issues:
>
> 1) Simple summing of per-task oom_score doesn't make sense.
> First, we calculate oom_score per-task, while should sum per-process values,
> or, better, per-mm struct. We can take only threa-group leader's score
> into account, but it's also not 100% accurate.
> And, again, we have a question what to do with per-task oom_score_adj,
> if we don't task the task's oom_score into account.
>
> Using memcg stats still looks to me as a more accurate and consistent
> way of estimating memcg memory footprint.
>
The patchset is introducing a new methodology for selecting oom victims so
you can define how cgroups are compared vs other cgroups with your own
"badness" calculation. I think your implementation based heavily on anon
and unevictable lrus and unreclaimable slab is fine and you can describe
that detail in the documentation (along with the caveat that it is only
calculated for nodes in the allocation's mempolicy). With
memory.oom_priority, the user has full ability to change that selection.
Process selection heuristics have changed over time themselves, it's not
something that must be backwards compatibile and trying to sum the usage
from each of the cgroup's mm_struct's and respect oom_score_adj is
unnecessarily complex.
Powered by blists - more mailing lists