Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-06-05 Thread Michal Hocko
On Fri 02-06-17 16:18:52, Roman Gushchin wrote: > On Fri, Jun 02, 2017 at 10:43:33AM +0200, Michal Hocko wrote: > > On Wed 31-05-17 14:01:45, Johannes Weiner wrote: > > > On Wed, May 31, 2017 at 06:25:04PM +0200, Michal Hocko wrote: > > > > > > + /* > > > > > > * If current has a pending SIG

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-06-02 Thread Roman Gushchin
On Fri, Jun 02, 2017 at 10:43:33AM +0200, Michal Hocko wrote: > On Wed 31-05-17 14:01:45, Johannes Weiner wrote: > > On Wed, May 31, 2017 at 06:25:04PM +0200, Michal Hocko wrote: > > > > > + /* > > > > >* If current has a pending SIGKILL or is exiting, then > > > > > automatically > >

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-06-02 Thread Michal Hocko
On Wed 31-05-17 14:01:45, Johannes Weiner wrote: > On Wed, May 31, 2017 at 06:25:04PM +0200, Michal Hocko wrote: > > On Thu 25-05-17 13:08:05, Johannes Weiner wrote: > > > Everything the user would want to dynamically program in the kernel, > > > say with bpf, they could do in userspace and then up

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-31 Thread Johannes Weiner
On Wed, May 31, 2017 at 06:25:04PM +0200, Michal Hocko wrote: > On Thu 25-05-17 13:08:05, Johannes Weiner wrote: > > Everything the user would want to dynamically program in the kernel, > > say with bpf, they could do in userspace and then update the scores > > for each group and task periodically.

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-31 Thread Michal Hocko
[I am sorry I didn't get to reply earlier] On Thu 25-05-17 13:08:05, Johannes Weiner wrote: > On Thu, May 25, 2017 at 05:38:19PM +0200, Michal Hocko wrote: > > On Tue 23-05-17 09:25:44, Johannes Weiner wrote: [...] > > > We don't need any elaborate > > > just-in-time evaluation of what each entity

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-25 Thread Johannes Weiner
On Thu, May 25, 2017 at 05:38:19PM +0200, Michal Hocko wrote: > On Tue 23-05-17 09:25:44, Johannes Weiner wrote: > > On Tue, May 23, 2017 at 09:07:47AM +0200, Michal Hocko wrote: > > > On Mon 22-05-17 18:01:16, Roman Gushchin wrote: > [...] > > > > How to react on an OOM - is definitely a policy, w

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-25 Thread Michal Hocko
On Tue 23-05-17 09:25:44, Johannes Weiner wrote: > On Tue, May 23, 2017 at 09:07:47AM +0200, Michal Hocko wrote: > > On Mon 22-05-17 18:01:16, Roman Gushchin wrote: [...] > > > How to react on an OOM - is definitely a policy, which depends > > > on the workload. Nothing is changing here from how it

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-23 Thread Johannes Weiner
On Tue, May 23, 2017 at 09:07:47AM +0200, Michal Hocko wrote: > On Mon 22-05-17 18:01:16, Roman Gushchin wrote: > > On Sat, May 20, 2017 at 09:37:29PM +0300, Vladimir Davydov wrote: > > > On Thu, May 18, 2017 at 05:28:04PM +0100, Roman Gushchin wrote: > > > ... > > > > +5-2-4. Cgroup-aware OOM Kill

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-23 Thread Michal Hocko
On Mon 22-05-17 18:01:16, Roman Gushchin wrote: > On Sat, May 20, 2017 at 09:37:29PM +0300, Vladimir Davydov wrote: > > Hello Roman, > > Hi Vladimir! > > > > > On Thu, May 18, 2017 at 05:28:04PM +0100, Roman Gushchin wrote: > > ... > > > +5-2-4. Cgroup-aware OOM Killer > > > + > > > +Cgroup v2 m

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-22 Thread Roman Gushchin
On Sat, May 20, 2017 at 09:37:29PM +0300, Vladimir Davydov wrote: > Hello Roman, Hi Vladimir! > > On Thu, May 18, 2017 at 05:28:04PM +0100, Roman Gushchin wrote: > ... > > +5-2-4. Cgroup-aware OOM Killer > > + > > +Cgroup v2 memory controller implements a cgroup-aware OOM killer. > > +It means t

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-20 Thread Vladimir Davydov
Hello Roman, On Thu, May 18, 2017 at 05:28:04PM +0100, Roman Gushchin wrote: ... > +5-2-4. Cgroup-aware OOM Killer > + > +Cgroup v2 memory controller implements a cgroup-aware OOM killer. > +It means that it treats memory cgroups as memory consumers > +rather then individual processes. Under the O

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-19 Thread Michal Hocko
On Thu 18-05-17 14:11:17, Johannes Weiner wrote: > On Thu, May 18, 2017 at 07:30:04PM +0200, Michal Hocko wrote: > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > > > Traditionally, the OOM killer is operating on a process level. > > > Under oom conditions, it finds a process with the highest o

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Johannes Weiner
On Fri, May 19, 2017 at 05:43:59AM +1000, Balbir Singh wrote: > On Thu, 2017-05-18 at 15:22 -0400, Johannes Weiner wrote: > > On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > > > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > > > On Thu 18-05-17 17:28:04, Roman Gushchin wr

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Balbir Singh
On Thu, 2017-05-18 at 15:22 -0400, Johannes Weiner wrote: > On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > > > > Traditionally, the OOM killer is operating on a process l

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Balbir Singh
On Thu, 2017-05-18 at 20:20 +0100, Roman Gushchin wrote: > On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > > > > Traditionally, the OOM killer is operating on a process le

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Johannes Weiner
On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > >> Traditionally, the OOM killer is operating on a process level. > >> Under oom conditions, it finds a process with the highes

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Roman Gushchin
On Fri, May 19, 2017 at 04:37:27AM +1000, Balbir Singh wrote: > On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > > On Thu 18-05-17 17:28:04, Roman Gushchin wrote: > >> Traditionally, the OOM killer is operating on a process level. > >> Under oom conditions, it finds a process with the highes

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Balbir Singh
On Fri, May 19, 2017 at 3:30 AM, Michal Hocko wrote: > On Thu 18-05-17 17:28:04, 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

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Johannes Weiner
On Thu, May 18, 2017 at 07:30:04PM +0200, Michal Hocko wrote: > On Thu 18-05-17 17:28:04, 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

Re: [RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 Thread Michal Hocko
On Thu 18-05-17 17:28:04, 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. There are two main i

[RFC PATCH] mm, oom: cgroup-aware OOM-killer

2017-05-18 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. There are two main issues: 1) There is no fairness between containers. A small