Re: [PATCH 2/2] mm: page_alloc: tighten up find_suitable_fallback()
From: Brendan Jackman
Date: Fri Apr 11 2025 - 11:09:57 EST
On Fri Apr 11, 2025 at 1:45 PM UTC, Johannes Weiner wrote:
>> - if (find_suitable_fallback(area, order, migratetype, true) >= 0)
>> + if (should_try_claim_block(order, migratetype) &&
>> + find_fallback_migratetype(area, order, migratetype) >= 0)
>
> So I agree with pushing the test into the callers. However, I think
> the name "should_try_claim_block()" is not great for this. It makes
> sense in the alloc/fallback path, but compaction here doesn't claim
> anything. It just wants to know if this order + migratetype is
> eligible under block claiming rules.
>
> IMO this would be more readable with the old terminology:
>
> if (can_claim_block(order, migratetype) &&
> find_fallback_migratetype(area, order, migratetype) >= 0)
Sure, that makes sense, here's a modified version of the patch:
---