Re: [PATCH v2] mm/khugepaged: cap min_free_kbytes recommendation at 1 GiB
From: Nimrod Oren
Date: Mon Aug 31 2026 - 16:24:33 EST
On 31/08/2026 18:59, Lorenzo Stoakes (ARM) wrote:
> On Mon, Aug 31, 2026 at 11:00:13AM -0400, Zi Yan wrote:
>> On 31 Aug 2026, at 5:34, Lorenzo Stoakes (ARM) wrote:
>>> On Mon, Aug 31, 2026 at 11:20:30AM +0200, Michal Hocko wrote:
>>>> I would argue that the whole model of increasing min_free_kbytes for THP
>>>> is wrong. This will trigger memory reclaim sooner and make the THP
>>>> availability more likely but this was at times where we didn't have
>>>> pro-active compaction and many changes in the compaction. So is this
>>>> actually needed in general resp. only large pageblocks systems?
>>>
>>> Ohh even better :)
>>>
>>> I did find it strange that we increased accordingly.
>>>
>>> I'm more than happy to see this just die altogether if people agree that's
>>> a sensible way forward...
>>
>> It sounds reasonable to me.
>>
>> My first reaction was that THP generation might be hurt due to fewer
>> free pages. But probably the extra min_free_kbytes just moves reclaim earlier,
>> like Michal said.
>>
>> After removing this automatic min_free_kbytes bump, user can retain the old
>> behavior by setting a higher min_free_kbytes at boot time.
>
> Nimrod - care to send a patch to just yank this min_free_kbytes change for
> thp out? :)
>
> This solves your problem another way and is neater overall.
Absolutely :)
Thanks for the suggestion!