[PATCH -v2] mm, oom: do not fail __GFP_NOFAIL allocation if oom killer is disbaled

From: Michal Hocko
Date: Wed Feb 25 2015 - 09:08:32 EST


On Tue 24-02-15 12:23:55, David Rientjes wrote:
> On Tue, 24 Feb 2015, Johannes Weiner wrote:
[...]
> > I'm fine with keeping the allocation looping, but is that message
> > helpful? It seems completely useless to the user encountering it. Is
> > it going to help kernel developers when we get a bug report with it?
> >
> > WARN_ON_ONCE()?
> >
>
> Yeah, I'm not sure that the warning is helpful (and it needs
> s/disbaled/disabled/ if it is to be kept). I also think this check should
> be moved out of out_of_memory() since gfp/retry logic should be in the
> page allocator itself and not in the oom killer: just make
> __alloc_pages_may_oom() also set *did_some_progress = 1 for __GFP_NOFAIL.

OK, this is a good point. Updated patch is below:
---