Re: [PATCH v2] mm, vmscan: make kswapd unreserve highatomic pageblocks

From: Jose A. Perez de Azpillaga

Date: Tue Nov 10 2026 - 09:29:51 EST


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].

[1]:
https://sashiko.dev/#/patchset/20261109-kswapd-highatomic-unreserve-v2-1-6587ca75c77f%40kernel.org

--
cheers,
jose a. p-a