From: Michal Hocko <mhocko@kernel.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
David Rientjes <rientjes@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: oom: deduplicate victim selection code for memcg and global oom
Date: Fri, 27 May 2016 16:26:26 +0200 [thread overview]
Message-ID: <20160527142626.GQ27686@dhcp22.suse.cz> (raw)
In-Reply-To: <3bbc7b70dae6ace0b8751e0140e878acfdfffd74.1464358556.git.vdavydov@virtuozzo.com>
On Fri 27-05-16 17:17:42, Vladimir Davydov wrote:
> When selecting an oom victim, we use the same heuristic for both memory
> cgroup and global oom. The only difference is the scope of tasks to
> select the victim from. So we could just export an iterator over all
> memcg tasks and keep all oom related logic in oom_kill.c, but instead we
> duplicate pieces of it in memcontrol.c reusing some initially private
> functions of oom_kill.c in order to not duplicate all of it. That looks
> ugly and error prone, because any modification of select_bad_process
> should also be propagated to mem_cgroup_out_of_memory.
>
> Let's rework this as follows: keep all oom heuristic related code
> private to oom_kill.c and make oom_kill.c use exported memcg functions
> when it's really necessary (like in case of iterating over memcg tasks).
I am doing quite large changes in this area and this would cause many
conflicts. Do you think you can postpone this after my patchset [1] gets
sorted out please?
I haven't looked at the patch carefully so I cannot tell much about it
right now but just wanted to give a heads up for the conflicts.
[1] http://lkml.kernel.org/r/1464266415-15558-1-git-send-email-mhocko@kernel.org
Thanks!
>
> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
> ---
> include/linux/memcontrol.h | 15 ++++
> include/linux/oom.h | 51 -------------
> mm/memcontrol.c | 112 ++++++++++-----------------
> mm/oom_kill.c | 183 +++++++++++++++++++++++++++++----------------
> 4 files changed, 176 insertions(+), 185 deletions(-)
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2016-05-27 14:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 14:17 [PATCH 1/2] mm: oom: add memcg to oom_control Vladimir Davydov
2016-05-27 14:17 ` [PATCH 2/2] mm: oom: deduplicate victim selection code for memcg and global oom Vladimir Davydov
2016-05-27 14:26 ` Michal Hocko [this message]
2016-05-27 14:45 ` Vladimir Davydov
2016-05-27 14:52 ` Michal Hocko
2016-05-27 17:23 ` Johannes Weiner
2016-06-08 8:33 ` Michal Hocko
2016-06-08 11:18 ` Tetsuo Handa
2016-06-08 11:24 ` Tetsuo Handa
2016-06-08 14:21 ` Michal Hocko
2016-06-08 13:52 ` Vladimir Davydov
2016-06-08 14:46 ` Michal Hocko
2016-05-27 14:34 ` [PATCH 1/2] mm: oom: add memcg to oom_control Michal Hocko
2016-05-27 17:20 ` Johannes Weiner
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=20160527142626.GQ27686@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rientjes@google.com \
--cc=vdavydov@virtuozzo.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;
as well as URLs for NNTP newsgroup(s).