Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-25 Thread Michal Hocko
On Fri 25-11-16 21:00:52, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > > > If __alloc_pages_nowmark() called by __GFP_NOFAIL could not find pages > > > with requested order due to fragmentation, __GFP_NOFAIL should invoke > > > the OOM killer. I

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-25 Thread Michal Hocko
On Fri 25-11-16 21:00:52, Tetsuo Handa wrote: > Michal Hocko wrote: > > On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > > > If __alloc_pages_nowmark() called by __GFP_NOFAIL could not find pages > > > with requested order due to fragmentation, __GFP_NOFAIL should invoke > > > the OOM killer. I

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-25 Thread Tetsuo Handa
Michal Hocko wrote: > On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > > If __alloc_pages_nowmark() called by __GFP_NOFAIL could not find pages > > with requested order due to fragmentation, __GFP_NOFAIL should invoke > > the OOM killer. I believe that risking kill all processes and panic the > >

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-25 Thread Tetsuo Handa
Michal Hocko wrote: > On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > > If __alloc_pages_nowmark() called by __GFP_NOFAIL could not find pages > > with requested order due to fragmentation, __GFP_NOFAIL should invoke > > the OOM killer. I believe that risking kill all processes and panic the > >

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Thu 24-11-16 08:41:30, Vlastimil Babka wrote: > On 11/23/2016 01:35 PM, Michal Hocko wrote: > > On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: [...] > > > > static inline struct page * > > > > +__alloc_pages_nowmark(gfp_t gfp_mask, unsigned int order, > > > > +

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Thu 24-11-16 08:41:30, Vlastimil Babka wrote: > On 11/23/2016 01:35 PM, Michal Hocko wrote: > > On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: [...] > > > > static inline struct page * > > > > +__alloc_pages_nowmark(gfp_t gfp_mask, unsigned int order, > > > > +

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Vlastimil Babka
On 11/23/2016 01:35 PM, Michal Hocko wrote: On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: This makes some sense to me, but there might be unpleasant consequences, e.g. due to allowing costly allocations without reserves. I am not sure I understand. Did you mean with reserves? Anyway, my

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Vlastimil Babka
On 11/23/2016 01:35 PM, Michal Hocko wrote: On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: This makes some sense to me, but there might be unpleasant consequences, e.g. due to allowing costly allocations without reserves. I am not sure I understand. Did you mean with reserves? Anyway, my

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > Michal Hocko wrote: > > From: Michal Hocko > > > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > > the allocation request. This includes lowmem requests, costly high > > order requests and others. For a

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Wed 23-11-16 23:35:10, Tetsuo Handa wrote: > Michal Hocko wrote: > > From: Michal Hocko > > > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > > the allocation request. This includes lowmem requests, costly high > > order requests and others. For a long time

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Tetsuo Handa
Michal Hocko wrote: > From: Michal Hocko > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > the allocation request. This includes lowmem requests, costly high > order requests and others. For a long time __GFP_NOFAIL acted as an > override for all those

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Tetsuo Handa
Michal Hocko wrote: > From: Michal Hocko > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > the allocation request. This includes lowmem requests, costly high > order requests and others. For a long time __GFP_NOFAIL acted as an > override for all those rules. This is not

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: > On 11/23/2016 07:49 AM, Michal Hocko wrote: > > From: Michal Hocko > > > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > > the allocation request. This includes lowmem requests, costly high > > order

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Michal Hocko
On Wed 23-11-16 13:19:20, Vlastimil Babka wrote: > On 11/23/2016 07:49 AM, Michal Hocko wrote: > > From: Michal Hocko > > > > __alloc_pages_may_oom makes sure to skip the OOM killer depending on > > the allocation request. This includes lowmem requests, costly high > > order requests and others.

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Vlastimil Babka
On 11/23/2016 07:49 AM, Michal Hocko wrote: From: Michal Hocko __alloc_pages_may_oom makes sure to skip the OOM killer depending on the allocation request. This includes lowmem requests, costly high order requests and others. For a long time __GFP_NOFAIL acted as an override

Re: [RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-23 Thread Vlastimil Babka
On 11/23/2016 07:49 AM, Michal Hocko wrote: From: Michal Hocko __alloc_pages_may_oom makes sure to skip the OOM killer depending on the allocation request. This includes lowmem requests, costly high order requests and others. For a long time __GFP_NOFAIL acted as an override for all those

[RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-22 Thread Michal Hocko
From: Michal Hocko __alloc_pages_may_oom makes sure to skip the OOM killer depending on the allocation request. This includes lowmem requests, costly high order requests and others. For a long time __GFP_NOFAIL acted as an override for all those rules. This is not documented and

[RFC 2/2] mm, oom: do not enfore OOM killer for __GFP_NOFAIL automatically

2016-11-22 Thread Michal Hocko
From: Michal Hocko __alloc_pages_may_oom makes sure to skip the OOM killer depending on the allocation request. This includes lowmem requests, costly high order requests and others. For a long time __GFP_NOFAIL acted as an override for all those rules. This is not documented and it can be quite