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

Brendan Jackman
2025-02-24T12:35:31Z

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
- 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.