Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-14 Thread Roman Gushchin
On Tue, Aug 08, 2017 at 04:06:38PM -0700, David Rientjes wrote: > On Tue, 1 Aug 2017, Roman Gushchin wrote: > > > > To the rest of the patch. I have to say I do not quite like how it is > > > implemented. I was hoping for something much simpler which would hook > > > into oom_evaluate_task. If a

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-14 Thread Roman Gushchin
On Tue, Aug 08, 2017 at 04:06:38PM -0700, David Rientjes wrote: > On Tue, 1 Aug 2017, Roman Gushchin wrote: > > > > To the rest of the patch. I have to say I do not quite like how it is > > > implemented. I was hoping for something much simpler which would hook > > > into oom_evaluate_task. If a

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-08 Thread David Rientjes
On Tue, 1 Aug 2017, Roman Gushchin wrote: > > To the rest of the patch. I have to say I do not quite like how it is > > implemented. I was hoping for something much simpler which would hook > > into oom_evaluate_task. If a task belongs to a memcg with kill-all flag > > then we would update the

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-08 Thread David Rientjes
On Tue, 1 Aug 2017, Roman Gushchin wrote: > > To the rest of the patch. I have to say I do not quite like how it is > > implemented. I was hoping for something much simpler which would hook > > into oom_evaluate_task. If a task belongs to a memcg with kill-all flag > > then we would update the

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-03 Thread Michal Hocko
On Thu 03-08-17 13:47:51, Roman Gushchin wrote: > On Wed, Aug 02, 2017 at 09:29:01AM +0200, Michal Hocko wrote: > > On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > > > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > > >

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-03 Thread Michal Hocko
On Thu 03-08-17 13:47:51, Roman Gushchin wrote: > On Wed, Aug 02, 2017 at 09:29:01AM +0200, Michal Hocko wrote: > > On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > > > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > > >

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-03 Thread Roman Gushchin
On Wed, Aug 02, 2017 at 09:29:01AM +0200, Michal Hocko wrote: > On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-03 Thread Roman Gushchin
On Wed, Aug 02, 2017 at 09:29:01AM +0200, Michal Hocko wrote: > On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-02 Thread Michal Hocko
On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > > [...] > > > > I would reap out the oom_kill_process into a

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-02 Thread Michal Hocko
On Tue 01-08-17 19:13:52, Roman Gushchin wrote: > On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > > [...] > > > > I would reap out the oom_kill_process into a

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Roman Gushchin
On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > [...] > > > I would reap out the oom_kill_process into a separate patch. > > > > It was a separate patch, I've merged

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Roman Gushchin
On Tue, Aug 01, 2017 at 07:03:03PM +0200, Michal Hocko wrote: > On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > [...] > > > I would reap out the oom_kill_process into a separate patch. > > > > It was a separate patch, I've merged

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Michal Hocko
On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: [...] > > I would reap out the oom_kill_process into a separate patch. > > It was a separate patch, I've merged it based on Vladimir's feedback. > No problems, I can divide it back. It

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Michal Hocko
On Tue 01-08-17 16:25:48, Roman Gushchin wrote: > On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: [...] > > I would reap out the oom_kill_process into a separate patch. > > It was a separate patch, I've merged it based on Vladimir's feedback. > No problems, I can divide it back. It

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Roman Gushchin
On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > On Wed 26-07-17 14:27:16, Roman Gushchin wrote: > [...] > > +static long memcg_oom_badness(struct mem_cgroup *memcg, > > + const nodemask_t *nodemask) > > +{ > > + long points = 0; > > + int nid; > > + > >

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Roman Gushchin
On Tue, Aug 01, 2017 at 04:54:35PM +0200, Michal Hocko wrote: > On Wed 26-07-17 14:27:16, Roman Gushchin wrote: > [...] > > +static long memcg_oom_badness(struct mem_cgroup *memcg, > > + const nodemask_t *nodemask) > > +{ > > + long points = 0; > > + int nid; > > + > >

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Michal Hocko
On Wed 26-07-17 14:27:16, Roman Gushchin wrote: [...] > +static long memcg_oom_badness(struct mem_cgroup *memcg, > + const nodemask_t *nodemask) > +{ > + long points = 0; > + int nid; > + > + for_each_node_state(nid, N_MEMORY) { > + if (nodemask &&

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-08-01 Thread Michal Hocko
On Wed 26-07-17 14:27:16, Roman Gushchin wrote: [...] > +static long memcg_oom_badness(struct mem_cgroup *memcg, > + const nodemask_t *nodemask) > +{ > + long points = 0; > + int nid; > + > + for_each_node_state(nid, N_MEMORY) { > + if (nodemask &&

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-07-27 Thread kbuild test robot
Hi Roman, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc2 next-20170727] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [v4 2/4] mm, oom: cgroup-aware OOM killer

2017-07-27 Thread kbuild test robot
Hi Roman, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc2 next-20170727] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[v4 2/4] mm, oom: cgroup-aware OOM killer

2017-07-26 Thread Roman Gushchin
Traditionally, the OOM killer is operating on a process level. Under oom conditions, it finds a process with the highest oom score and kills it. This behavior doesn't suit well the system with many running containers: 1) There is no fairness between containers. A small container with few large

[v4 2/4] mm, oom: cgroup-aware OOM killer

2017-07-26 Thread Roman Gushchin
Traditionally, the OOM killer is operating on a process level. Under oom conditions, it finds a process with the highest oom score and kills it. This behavior doesn't suit well the system with many running containers: 1) There is no fairness between containers. A small container with few large