From: chengkaitao <chengkaitao@didiglobal.com>
To: <tj@kernel.org>, <lizefan.x@bytedance.com>, <hannes@cmpxchg.org>,
<corbet@lwn.net>, <mhocko@kernel.org>, <roman.gushchin@linux.dev>,
<shakeelb@google.com>, <akpm@linux-foundation.org>,
<brauner@kernel.org>, <muchun.song@linux.dev>
Cc: <viro@zeniv.linux.org.uk>, <zhengqi.arch@bytedance.com>,
<ebiederm@xmission.com>, <Liam.Howlett@Oracle.com>,
<chengzhihao1@huawei.com>, <pilgrimtao@gmail.com>,
<haolee.swjtu@gmail.com>, <yuzhao@google.com>,
<willy@infradead.org>, <vasily.averin@linux.dev>,
<vbabka@suse.cz>, <surenb@google.com>, <sfr@canb.auug.org.au>,
<mcgrof@kernel.org>, <sujiaxun@uniontech.com>,
<feng.tang@intel.com>, <cgroups@vger.kernel.org>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>, <linux-mm@kvack.org>,
chengkaitao <chengkaitao@didiglobal.com>
Subject: [PATCH v3 0/2] memcontrol: support cgroup level OOM protection
Date: Sat, 6 May 2023 19:49:46 +0800 [thread overview]
Message-ID: <20230506114948.6862-1-chengkaitao@didiglobal.com> (raw)
Establish a new OOM score algorithm, supports the cgroup level OOM
protection mechanism. When an global/memcg oom event occurs, we treat
all processes in the cgroup as a whole, and OOM killers need to select
the process to kill based on the protection quota of the cgroup
Changelog:
v3:
* Add "auto" option for memory.oom.protect. (patch 1)
* Fix division errors. (patch 1)
* Add observation indicator oom_kill_inherit. (patch 2)
v2:
* Modify the formula of the process request memcg protection quota.
https://lore.kernel.org/linux-mm/20221208034644.3077-1-chengkaitao@didiglobal.com/
v1:
https://lore.kernel.org/linux-mm/20221130070158.44221-1-chengkaitao@didiglobal.com/
chengkaitao (2):
mm: memcontrol: protect the memory in cgroup from being oom killed
memcg: add oom_kill_inherit event indicator
Documentation/admin-guide/cgroup-v2.rst | 29 ++++-
fs/proc/base.c | 17 ++-
include/linux/memcontrol.h | 46 +++++++-
include/linux/oom.h | 3 +-
include/linux/page_counter.h | 6 +
mm/memcontrol.c | 199 ++++++++++++++++++++++++++++++++
mm/oom_kill.c | 25 ++--
mm/page_counter.c | 30 +++++
8 files changed, 334 insertions(+), 21 deletions(-)
--
2.14.1
next reply other threads:[~2023-05-06 11:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 11:49 chengkaitao [this message]
2023-05-06 11:49 ` [PATCH v3 1/2] mm: memcontrol: protect the memory in cgroup from being oom killed chengkaitao
2023-05-06 11:49 ` [PATCH v3 2/2] memcg: add oom_kill_inherit event indicator chengkaitao
2023-05-07 10:11 ` [PATCH v3 0/2] memcontrol: support cgroup level OOM protection Michal Hocko
2023-05-08 9:08 ` 程垲涛 Chengkaitao Cheng
2023-05-08 14:18 ` Michal Hocko
2023-05-09 6:50 ` 程垲涛 Chengkaitao Cheng
2023-05-22 13:03 ` Michal Hocko
2023-05-25 7:35 ` 程垲涛 Chengkaitao Cheng
2023-05-29 14:02 ` Michal Hocko
[not found] ` <C5E5137F-8754-40CC-9F0C-0EB3D8AC1EC2@didiglobal.com>
2023-06-13 8:16 ` Michal Hocko
[not found] ` <CAJD7tkaw_7vYACsyzAtY9L0ZVC0B=XJEWgG=Ad_dOtL_pBDDvQ@mail.gmail.com>
2023-06-13 8:27 ` Michal Hocko
2023-06-13 8:36 ` Yosry Ahmed
2023-06-13 12:06 ` Michal Hocko
2023-06-13 20:24 ` Yosry Ahmed
2023-06-15 10:39 ` Michal Hocko
2023-06-16 1:44 ` Yosry Ahmed
2023-06-13 8:40 ` tj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230506114948.6862-1-chengkaitao@didiglobal.com \
--to=chengkaitao@didiglobal.com \
--cc=Liam.Howlett@Oracle.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chengzhihao1@huawei.com \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=feng.tang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=haolee.swjtu@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=mcgrof@kernel.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=pilgrimtao@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=sfr@canb.auug.org.au \
--cc=shakeelb@google.com \
--cc=sujiaxun@uniontech.com \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=vasily.averin@linux.dev \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yuzhao@google.com \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox