From: Vladimir Davydov <vdavydov@virtuozzo.com>
To: Michal Hocko <mhocko@kernel.org>
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 17:45:49 +0300 [thread overview]
Message-ID: <20160527144549.GC26059@esperanza> (raw)
In-Reply-To: <20160527142626.GQ27686@dhcp22.suse.cz>
On Fri, May 27, 2016 at 04:26:26PM +0200, Michal Hocko wrote:
> 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'm fine with it.
>
> 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.
I'd appreciate if you could take a look at this patch once time permits.
Thanks,
Vladimir
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Davydov <vdavydov@virtuozzo.com>
To: Michal Hocko <mhocko@kernel.org>
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 17:45:49 +0300 [thread overview]
Message-ID: <20160527144549.GC26059@esperanza> (raw)
In-Reply-To: <20160527142626.GQ27686@dhcp22.suse.cz>
On Fri, May 27, 2016 at 04:26:26PM +0200, Michal Hocko wrote:
> 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'm fine with it.
>
> 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.
I'd appreciate if you could take a look at this patch once time permits.
Thanks,
Vladimir
next prev parent reply other threads:[~2016-05-27 14:46 UTC|newest]
Thread overview: 28+ 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 ` 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:17 ` Vladimir Davydov
2016-05-27 14:26 ` Michal Hocko
2016-05-27 14:26 ` Michal Hocko
2016-05-27 14:45 ` Vladimir Davydov [this message]
2016-05-27 14:45 ` Vladimir Davydov
2016-05-27 14:52 ` Michal Hocko
2016-05-27 14:52 ` Michal Hocko
2016-05-27 17:23 ` Johannes Weiner
2016-05-27 17:23 ` Johannes Weiner
2016-06-08 8:33 ` Michal Hocko
2016-06-08 8:33 ` Michal Hocko
2016-06-08 11:18 ` Tetsuo Handa
2016-06-08 11:18 ` Tetsuo Handa
2016-06-08 11:24 ` Tetsuo Handa
2016-06-08 11:24 ` Tetsuo Handa
2016-06-08 14:21 ` Michal Hocko
2016-06-08 14:21 ` Michal Hocko
2016-06-08 13:52 ` Vladimir Davydov
2016-06-08 13:52 ` Vladimir Davydov
2016-06-08 14:46 ` Michal Hocko
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 14:34 ` Michal Hocko
2016-05-27 17:20 ` Johannes Weiner
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=20160527144549.GC26059@esperanza \
--to=vdavydov@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.