Re: [PATCH] mm/page_alloc: Clarify some migratetype fallback code

Vlastimil Babka
2025-02-25T08:40:22Z

On 2/24/25 13:35, Brendan Jackman wrote:
> On Tue, 18 Feb 2025 at 11:20, Vlastimil Babka <vbabka@suse.cz> wrote:
>> Would it make sense to have only "bool *whole_block" parameter of
>> find_suitable_fallback? The value the caller initializes it, it means the
>> current need_whole_block, the value it has upon return it instructs the
>> caller what to do. It would mean __compact_finished() would no longer pass
>> an unused parameter.
>
> I thought I liked this idea but once I tried it out I changed my mind

Right, me too actually.

> - the unused parameter is a bit of noise, but doing the above makes
> the function interface and implementation harder to understand.
>
> I also thought of allowing the caller to specify NULL which would have
> the current meaning of only_steal=true, but again I don't think it's
> worth it.
>
> So I'll skip this for v2 but we can always extend it later. I think
> it's likely that I'll end up proposing some other change to this
> interface for ASI anyway, let's see.

Ack.