Re: [PATCH v2] mm, vmscan: make kswapd unreserve highatomic pageblocks
From: Vlastimil Babka (SUSE)
Date: Wed Nov 11 2026 - 05:28:59 EST
On 11/10/26 14:25, Jose A. Perez de Azpillaga wrote:
> On 11/9/26 11:20 AM, Vlastimil Babka (SUSE) wrote:
> [snip]
>
>> Hook this highatomic unreserve to the moment we exit the loop in
>> balance_pgdat() due to exhausting reclaim priority, which means pgdat
>> was not balanced and the last kswapd_shrink_node() attempt returned
>> false or failed to reclaim anything. Even if that last attempt made the
>> pgdat balanced, kswapd was struggling enough, so unreserving is far from
>> premature. This should be a more conservative variant of when direct
>> reclaim failure triggers the unreserving. Pass force as true to make
>> sure repeated failures fully unreserve everything. Also make sure we
>> don't count kswapd failures until then. Don't restart immediately as
>> the kswapd() loop will call balance_pgdat() again if the unreserve does
>> not lead to a balanced pgdat.
>>
>
> the lowest priority gating looks good to me.
>
> however, sashiko found some concerns [1].
Yeah I saw, and I wonder why there was no email this time.
The inability to unreserve when there's no free highatomic pages to grab
onto is concerning on its own. Should be a pfn scanner probably.
> [1]:
> https://sashiko.dev/#/patchset/20261109-kswapd-highatomic-unreserve-v2-1-6587ca75c77f%40kernel.org
>