Re: [PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-07-23 Thread Vladimir Davydov
On Thu, Jul 21, 2016 at 08:41:44AM -0400, Johannes Weiner wrote: > On Mon, Jun 27, 2016 at 07:39:54PM +0300, 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 vic

Re: [PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-07-21 Thread Johannes Weiner
Hi Vladimir, Sorry for getting to this only now. On Mon, Jun 27, 2016 at 07:39:54PM +0300, 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

Re: [PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-07-01 Thread Michal Hocko
On Tue 28-06-16 19:16:42, Vladimir Davydov wrote: > On Mon, Jun 27, 2016 at 05:14:31PM -0700, David Rientjes wrote: > > On Mon, 27 Jun 2016, Vladimir Davydov wrote: > > > > > When selecting an oom victim, we use the same heuristic for both memory > > > cgroup and global oom. The only difference is

Re: [PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-06-28 Thread Vladimir Davydov
On Mon, Jun 27, 2016 at 05:14:31PM -0700, David Rientjes wrote: > On Mon, 27 Jun 2016, 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 cou

Re: [PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-06-27 Thread David Rientjes
On Mon, 27 Jun 2016, 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

[PATCH v2] mm: oom: deduplicate victim selection code for memcg and global oom

2016-06-27 Thread Vladimir Davydov
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