[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5GTM5HLhGrx9zFO@dhcp22.suse.cz>
Date: Thu, 8 Dec 2022 08:33:07 +0100
From: Michal Hocko <mhocko@...e.com>
To: chengkaitao <pilgrimtao@...il.com>
Cc: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
corbet@....net, roman.gushchin@...ux.dev, shakeelb@...gle.com,
akpm@...ux-foundation.org, songmuchun@...edance.com,
chengkaitao@...iglobal.com, viro@...iv.linux.org.uk,
zhengqi.arch@...edance.com, ebiederm@...ssion.com,
Liam.Howlett@...cle.com, chengzhihao1@...wei.com,
haolee.swjtu@...il.com, yuzhao@...gle.com, willy@...radead.org,
vasily.averin@...ux.dev, vbabka@...e.cz, surenb@...gle.com,
sfr@...b.auug.org.au, mcgrof@...nel.org, sujiaxun@...ontech.com,
feng.tang@...el.com, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2] mm: memcontrol: protect the memory in cgroup from
being oom killed
On Thu 08-12-22 11:46:44, chengkaitao wrote:
> From: chengkaitao <pilgrimtao@...il.com>
>
> We created a new interface <memory.oom.protect> for memory, If there is
> the OOM killer under parent memory cgroup, and the memory usage of a
> child cgroup is within its effective oom.protect boundary, the cgroup's
> tasks won't be OOM killed unless there is no unprotected tasks in other
> children cgroups. It draws on the logic of <memory.min/low> in the
> inheritance relationship.
>
> It has the following advantages,
> 1. We have the ability to protect more important processes, when there
> is a memcg's OOM killer. The oom.protect only takes effect local memcg,
> and does not affect the OOM killer of the host.
> 2. Historically, we can often use oom_score_adj to control a group of
> processes, It requires that all processes in the cgroup must have a
> common parent processes, we have to set the common parent process's
> oom_score_adj, before it forks all children processes. So that it is
> very difficult to apply it in other situations. Now oom.protect has no
> such restrictions, we can protect a cgroup of processes more easily. The
> cgroup can keep some memory, even if the OOM killer has to be called.
>
> Signed-off-by: chengkaitao <pilgrimtao@...il.com>
> ---
> v2: Modify the formula of the process request memcg protection quota.
The new formula doesn't really address concerns expressed previously.
Please read my feedback carefully again and follow up with questions if
something is not clear.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists