Re: user defined OOM policies

2013-12-02 Thread David Rientjes
On Thu, 28 Nov 2013, Michal Hocko wrote: > > We already have hooks in the kernel oom killer, things like > > /proc/sys/vm/oom_kill_allocating_task > > How would you implement oom_kill_allocating_task in userspace? You do > not have any context on who is currently allocating or would you rely on

Re: user defined OOM policies

2013-12-02 Thread David Rientjes
On Thu, 28 Nov 2013, Michal Hocko wrote: > > Agreed, and I think the big downside of doing it with the loadable module > > suggestion is that you can't implement such a wide variety of different > > policies in modules. Each of our users who own a memcg tree on our > > systems may want to have

Re: user defined OOM policies

2013-11-28 Thread Michal Hocko
On Wed 20-11-13 19:33:00, David Rientjes wrote: [...] > Agreed, and I think the big downside of doing it with the loadable module > suggestion is that you can't implement such a wide variety of different > policies in modules. Each of our users who own a memcg tree on our > systems may want to

Re: user defined OOM policies

2013-11-28 Thread Michal Hocko
On Mon 25-11-13 17:29:20, David Rientjes wrote: > On Wed, 20 Nov 2013, Luigi Semenzato wrote: > > > Yes, I agree that we can't always prevent OOM situations, and in fact > > we tolerate OOM kills, although they have a worse impact on the users > > than controlled freeing does. > > > > If the con

Re: user defined OOM policies

2013-11-28 Thread Michal Hocko
On Fri 22-11-13 13:08:35, Johannes Weiner wrote: > On Wed, Nov 20, 2013 at 11:03:33PM -0800, Luigi Semenzato wrote: > > On Wed, Nov 20, 2013 at 7:36 PM, David Rientjes wrote: > > > On Wed, 20 Nov 2013, Luigi Semenzato wrote: > > > > > >> Chrome OS uses a custom low-memory notification to minimize

Re: user defined OOM policies

2013-11-25 Thread David Rientjes
On Thu, 21 Nov 2013, Michal Hocko wrote: > > It's an interesting idea but unfortunately a non-starter for us because > > our users don't have root, > > I wouldn't see this as a problem. You can still have a module which > exports the notification interface you need. Including timeout > fallback.

Re: user defined OOM policies

2013-11-25 Thread David Rientjes
On Thu, 21 Nov 2013, Jörn Engel wrote: > One ancient option I sometime miss was this: > - Kill the biggest process. > That's what both the system and memcg oom killer currently do unless you change how "biggest process" is defined with /proc/pid/oom_score_adj. The goal is the kill a sin

Re: user defined OOM policies

2013-11-25 Thread David Rientjes
On Wed, 20 Nov 2013, Luigi Semenzato wrote: > Yes, I agree that we can't always prevent OOM situations, and in fact > we tolerate OOM kills, although they have a worse impact on the users > than controlled freeing does. > If the controlled freeing is able to actually free memory in time before

Re: user defined OOM policies

2013-11-22 Thread Johannes Weiner
On Wed, Nov 20, 2013 at 11:03:33PM -0800, Luigi Semenzato wrote: > On Wed, Nov 20, 2013 at 7:36 PM, David Rientjes wrote: > > On Wed, 20 Nov 2013, Luigi Semenzato wrote: > > > >> Chrome OS uses a custom low-memory notification to minimize OOM kills. > >> When the notifier triggers, the Chrome bro

Re: user defined OOM policies

2013-11-22 Thread Michal Hocko
On Fri 22-11-13 08:28:03, Vladimir Murzin wrote: > On Wed, Nov 20, 2013 at 06:33:57PM +0100, Michal Hocko wrote: > On Wed > 20-11-13 18:21:23, Vladimir Murzin wrote: > > On Tue, Nov 19, 2013 at > 02:40:07PM +0100, Michal Hocko wrote: > > Hi Michal > > > On Tue 19-11-13 > 14:14:00, Michal Hocko wrot

Re: user defined OOM policies

2013-11-21 Thread Vladimir Murzin
On Wed, Nov 20, 2013 at 06:33:57PM +0100, Michal Hocko wrote: > On Wed 20-11-13 18:21:23, Vladimir Murzin wrote: > > On Tue, Nov 19, 2013 at 02:40:07PM +0100, Michal Hocko wrote: > > Hi Michal > > > On Tue 19-11-13 14:14:00, Michal Hocko wrote: > > > [...] > > > > We have basically ended up with 3

Re: user defined OOM policies

2013-11-20 Thread Michal Hocko
On Wed 20-11-13 18:21:23, Vladimir Murzin wrote: > On Tue, Nov 19, 2013 at 02:40:07PM +0100, Michal Hocko wrote: > Hi Michal > > On Tue 19-11-13 14:14:00, Michal Hocko wrote: > > [...] > > > We have basically ended up with 3 options AFAIR: > > > 1) allow memcg approach (memcg.oom_control) on the

Re: user defined OOM policies

2013-11-20 Thread Vladimir Murzin
Hi David On Wed, Nov 20, 2013 at 12:02:20AM -0800, David Rientjes wrote: > On Tue, 19 Nov 2013, Michal Hocko wrote: > > > > We have basically ended up with 3 options AFAIR: > > > 1) allow memcg approach (memcg.oom_control) on the root level > > >for both OOM notification and blockin

Re: user defined OOM policies

2013-11-20 Thread Vladimir Murzin
On Tue, Nov 19, 2013 at 02:40:07PM +0100, Michal Hocko wrote: Hi Michal > On Tue 19-11-13 14:14:00, Michal Hocko wrote: > [...] > > We have basically ended up with 3 options AFAIR: > > 1) allow memcg approach (memcg.oom_control) on the root level > >for both OOM notification and blo

Re: user defined OOM policies

2013-11-20 Thread Luigi Semenzato
On Wed, Nov 20, 2013 at 7:22 AM, Michal Hocko wrote: > On Wed 20-11-13 00:02:20, David Rientjes wrote: >> On Tue, 19 Nov 2013, Michal Hocko wrote: >> >> > > We have basically ended up with 3 options AFAIR: >> > > 1) allow memcg approach (memcg.oom_control) on the root level >> > >for

Re: user defined OOM policies

2013-11-20 Thread Michal Hocko
On Wed 20-11-13 00:02:20, David Rientjes wrote: > On Tue, 19 Nov 2013, Michal Hocko wrote: > > > > We have basically ended up with 3 options AFAIR: > > > 1) allow memcg approach (memcg.oom_control) on the root level > > >for both OOM notification and blocking OOM killer and handle >

Re: user defined OOM policies

2013-11-20 Thread David Rientjes
On Tue, 19 Nov 2013, Michal Hocko wrote: > > We have basically ended up with 3 options AFAIR: > > 1) allow memcg approach (memcg.oom_control) on the root level > >for both OOM notification and blocking OOM killer and handle > >the situation from the userspace same as we

Re: user defined OOM policies

2013-11-19 Thread David Rientjes
On Tue, 19 Nov 2013, Michal Hocko wrote: > Hi, > it's been quite some time since LSFMM 2013 when this has been > discussed[1]. In short, it seems that there are usecases with a > strong demand on a better user/admin policy control for the global > OOM situations. Per process oom_{adj,score} which

Re: user defined OOM policies

2013-11-19 Thread Michal Hocko
On Tue 19-11-13 14:14:00, Michal Hocko wrote: [...] > We have basically ended up with 3 options AFAIR: > 1) allow memcg approach (memcg.oom_control) on the root level >for both OOM notification and blocking OOM killer and handle >the situation from the userspace same a