Re: [patch 07/12] mm: page_alloc: inline should_alloc_retry()

From: Johannes Weiner
Date: Thu Mar 26 2015 - 11:18:39 EST


On Thu, Mar 26, 2015 at 03:11:28PM +0100, Michal Hocko wrote:
> On Wed 25-03-15 02:17:11, Johannes Weiner wrote:
> > The should_alloc_retry() function was meant to encapsulate retry
> > conditions of the allocator slowpath, but there are still checks
> > remaining in the main function, and much of how the retrying is
> > performed also depends on the OOM killer progress. The physical
> > separation of those conditions make the code hard to follow.
> >
> > Inline the should_alloc_retry() checks. Notes:
> >
> > - The __GFP_NOFAIL check is already done in __alloc_pages_may_oom(),
> > replace it with looping on OOM killer progress
> >
> > - The pm_suspended_storage() check is meant to skip the OOM killer
> > when reclaim has no IO available, move to __alloc_pages_may_oom()
> >
> > - The order < PAGE_ALLOC_COSTLY order is re-united with its original
> > counterpart of checking whether reclaim actually made any progress
>
> it should be order <= PAGE_ALLOC_COSTLY

Oops, thanks for catching that. I'll fix it in v2.

> > Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>
> The resulting code looks much better and logical.
>
> After the COSTLY check is fixed.
> Acked-by: Michal Hocko <mhocko@xxxxxxx>

Thank you
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/