Re: [patch] arch: remove __GFP_REPEAT for order-0 allocations

Andrew Morton
2010-09-28T22:53:26Z

On Tue, 28 Sep 2010 15:47:57 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:

> On Tue, 28 Sep 2010, Andrew Morton wrote:
>
> > > Order-0 allocations, including quicklist_alloc(), are always under
> > > PAGE_ALLOC_COSTLY_ORDER, so they loop endlessly in the page allocator
> > > already without the need for __GFP_REPEAT.
> >
> > That's only true for the current implementation of the page allocator.
> >
>
> Yes, but in this case it's irrelevant since we're talking about order-0
> allocations. The page allocator will never be changed so that order-0
> allocations immediately fail if there's no available memory, otherwise
> we'd only use direct reclaim and the oom killer for high-order allocs or
> add __GFP_NOFAIL everywhere and that's quite pointless.

The crystal balls are large on this one.

> So we can definitely remove __GFP_REPEAT for any order-0 allocation and
> it's based on its implementation -- poorly defined as it may be -- and the
> inherit design of any sane page allocator that retries such an allocation
> if it's going to use reclaim in the first place.

Why was __GFP_REPEAT used in those callsites? What were people trying
to achieve?

We shouldn't just go and ignorantly rip it out without understanding
this, and ensuring that we're meeting that intent to the best extent
possible.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: email@kvack.org