Re: [PATCH v3] mm: page_alloc: make defrag_mode retries follow the promoted order

From: Dev Jain

Date: Mon Oct 19 2026 - 03:01:51 EST




On 15/10/26 6:25 pm, Kiryl Shutsemau wrote:
> On Thu, Oct 15, 2026 at 09:16:36AM +0200, Vlastimil Babka (SUSE) wrote:
>>> And agree 7.4-rc1 with CC stable is fine. Sadly, not sure if anyone
>>> but Meta is using the feature right now.
>>
>> I thought it was there for a long time but it was only added in 2025 :) At
>> least the enterprise world is slow to adopt things, AFAICS.
>
> I was thinking to propose a patch after merge window to make defrag_mode
> default. Do you think it is too early? I don't think it is ever going
> to be truly stabilized without wider exposure.

AFAIU defrag mode is not going to improve mTHP allocation success.

I ran a synthetic benchmark faulting in lots of 64k mTHP with swap enabled,
defrag mode caused me to enter a warn_alloc (and 8 times more compact_stalls),
which didn't happen without defrag.

So perhaps bundle the default with pageblock_order eagerness etc.


>
> We also discussed with Johannes to make a stricter (defrag_mode=2?) mode
> that will not give up on fragmentation ever, but OOM instead.



>