[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z73WeTfMrtEmct_6@google.com>
Date: Tue, 25 Feb 2025 14:40:57 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Johannes Weiner <hannes@...xchg.org>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mm: page_alloc: don't steal single pages from
biggest buddy
On Tue, Feb 25, 2025 at 03:35:25PM +0100, Vlastimil Babka wrote:
> >> - return NULL;
> >> + if (alloc_flags & ALLOC_NOFRAGMENT)
> >> + return NULL;
> >
> > Is this a separate change? Is it a bug that we currently allow
> > stealing a from a fallback type when ALLOC_NOFRAGMENT? (I wonder if
> > the second loop was supposed to start from min_order).
>
> It's subtle but not a new condition. Previously ALLOC_NOFRAGMENT would
> result in not taking the "goto find_smallest" path because it means
> searching >=pageblock_order only and that would always be can_steal == true
> if it found a fallback. And failure to find fallback would reach an
> unconditional return NULL here. Now we fall through the search below
> (instead of the goto), but ALLOC_NOFRAGMENT must not do it so it's now
> explicit here.
Ahhhh yes, thank you for the help. The new explicit code is much
better.
Reviewed-by: Brendan Jackman <jackmanb@...gle.com>
Powered by blists - more mailing lists