Re: [RFC PATCH v2 0/4] mm: compaction: mTHP-friendly memory compaction
From: Vlastimil Babka (SUSE)
Date: Wed Oct 21 2026 - 05:34:55 EST
On 10/21/26 08:00, Bo Zhang wrote:
> On 10/20/26 16:52, Vlastimil Babka (SUSE) wrote:
>> Isn't using struct compact_control clean enough? There's already many
>> fields like
>> bool direct_compaction; /* False from kcompactd or /proc/... */
>> bool proactive_compaction; /* kcompactd proactive compaction */
>>
>> Who says is_via_compact_memory() cannot be refactored into something using
>> these kinds of fields and not 'order' being -1, which could be then used as
>> the target order.
>
> Thanks, that's a much cleaner direction than reading huge_anon_orders_always
> and would also address the race I raised in the second open question.
>
> I tried to work out what it takes, and ran into one thing I'd like your
> opinion on before committing to an approach.
I'm not going to answer your LLM's questions for you.