Re: [PATCH 2/4] mm: compaction: support non-movable compaction for pageblock requests
From: Vlastimil Babka (SUSE)
Date: Thu Jul 02 2026 - 05:46:26 EST
On 7/1/26 23:11, Johannes Weiner wrote:
> On Wed, Jul 01, 2026 at 08:14:05PM +0200, Vlastimil Babka (SUSE) wrote:
>>
>> > This made the migratetype filtering about preventing block
>> > pollution. The patch quotes reduced extfrag numbers.
>> >
>> > So now we have a block pollution guard that we apply only if... the
>> > scanner is latency sensitive? :) Is this actually desired behavior?
>>
>> Yeah indeed I was wondering in this direction.
>>
>> > Another way of looking at it would be this:
>> >
>> > /*
>> > * Allocation fallbacks can spread migratable pages
>> > * into non-movable blocks.
>>
>> But also vice versa, non-movable pages into movable blocks? (without
>> defrag_mode?).
>
> Uhm but those aren't compactable anymore then, right?
Yeah.
> There is a flipside, but it isn't quite symmetrical. Movable requests
> are allowed to look for movables in unmovable blocks once they become
> sync (high-effort, low-result). Non-movable requests are finally
> allowed to empty movable blocks once they become sync; they *start*
> with the high-effort, low-result mode to avoid block contamination but
> are allowed to escalate when that doesn't produce results.
Hm, true!
I was also thinking, if defrag mode doesn't allow that escalation ever
(IIRC?), should it be reflected here as well even with sync compaction?
> I'll try to work that second part into the comment as well.
Thanks!