Re: [RFC PATCH v2 0/4] mm: compaction: mTHP-friendly memory compaction
From: Vlastimil Babka (SUSE)
Date: Tue Oct 20 2026 - 11:01:28 EST
On 10/1/26 02:14, Bo Zhang wrote:
> Open questions:
>
> 1. In skip_isolation_on_order() and elsewhere, the target order is read
> from huge_anon_orders_always directly, since during proactive
> compaction cc->order is -1 (via compact_memory) and there is no clean
> way to plumb the mTHP order down.
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.
> This variable can change under
> userspace at any time, making the semantics fragile. Ideas on how to
> pass the target order through the proactive path cleanly are welcome.
>