Re: [PATCH] mm/compaction: sample empty pageblocks again from a random offset

From: Vlastimil Babka (SUSE)

Date: Mon Nov 16 2026 - 06:36:28 EST


On 11/16/26 12:32, Kiryl Shutsemau (Meta) wrote:
> On Mon, Nov 16, 2026 at 09:38:29AM +0100, Vlastimil Babka (SUSE) wrote:
>> > IOW I think the probability this patch is going to have a downside is
>> > more than that of upside.
>>
>> Agreed. This seems to all be based on a hypothetical scenario, only
>> constructed artificially to demonstrate it. A real-life motivation is needed.
>
> Fair enough, let's drop it.
>
> It is not entirely made up, though.
>
> I stepped on it while testing another series. A fragmentation stress
> test gave bimodal results: no direct reclaim in most runs and hundreds
> to thousands of allocstalls in others.
>
> It was confusing and looked like a regression in that series.
>
> It took a bisection to find that the only thing that mattered was where
> the free pages fell relative to the stride grid. The test in the
> changelog was built after that, to show it on purpose.

Yeah I think it's better to make such stress tests randomized instead. Such
regularity might hit even other unintended effects.

> The workload is very artificial, but the fix looked simple enough to
> post.
>