Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Michal Hocko
On Tue 31-10-17 20:06:44, Michal Hocko wrote: > On Tue 31-10-17 16:29:23, Michal Hocko wrote: > > On Tue 31-10-17 08:04:19, Shakeel Butt wrote: > > > > + > > > > +static void select_victim_memcg(struct mem_cgroup *root, struct > > > > oom_control *oc) > > > > +{ > > > > + struct mem_cgroup *

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Michal Hocko
On Tue 31-10-17 16:29:23, Michal Hocko wrote: > On Tue 31-10-17 08:04:19, Shakeel Butt wrote: > > > + > > > +static void select_victim_memcg(struct mem_cgroup *root, struct > > > oom_control *oc) > > > +{ > > > + struct mem_cgroup *iter; > > > + > > > + oc->chosen_memcg = NULL; > > > +

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Johannes Weiner
On Tue, Oct 31, 2017 at 10:50:43AM -0700, Shakeel Butt wrote: > On Tue, Oct 31, 2017 at 9:40 AM, Johannes Weiner wrote: > > On Tue, Oct 31, 2017 at 08:04:19AM -0700, Shakeel Butt wrote: > >> > + > >> > +static void select_victim_memcg(struct mem_cgroup *root, struct > >> > oom_control *oc) > >> >

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Shakeel Butt
On Tue, Oct 31, 2017 at 9:40 AM, Johannes Weiner wrote: > On Tue, Oct 31, 2017 at 08:04:19AM -0700, Shakeel Butt wrote: >> > + >> > +static void select_victim_memcg(struct mem_cgroup *root, struct >> > oom_control *oc) >> > +{ >> > + struct mem_cgroup *iter; >> > + >> > + oc->chosen_m

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Johannes Weiner
On Tue, Oct 31, 2017 at 08:04:19AM -0700, Shakeel Butt wrote: > > + > > +static void select_victim_memcg(struct mem_cgroup *root, struct > > oom_control *oc) > > +{ > > + struct mem_cgroup *iter; > > + > > + oc->chosen_memcg = NULL; > > + oc->chosen_points = 0; > > + > > +

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Michal Hocko
On Tue 31-10-17 08:04:19, Shakeel Butt wrote: > > + > > +static void select_victim_memcg(struct mem_cgroup *root, struct > > oom_control *oc) > > +{ > > + struct mem_cgroup *iter; > > + > > + oc->chosen_memcg = NULL; > > + oc->chosen_points = 0; > > + > > + /* > > +

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-31 Thread Shakeel Butt
> + > +static void select_victim_memcg(struct mem_cgroup *root, struct oom_control > *oc) > +{ > + struct mem_cgroup *iter; > + > + oc->chosen_memcg = NULL; > + oc->chosen_points = 0; > + > + /* > +* The oom_score is calculated for leaf memory cgroups (including > +

Re: [RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-19 Thread Michal Hocko
On Thu 19-10-17 19:52:15, Roman Gushchin wrote: > 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

[RESEND v12 3/6] mm, oom: cgroup-aware OOM killer

2017-10-19 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 pr