summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorGregory Price (Meta) <gourry@gourry.net>2026-10-19 14:48:50 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-11-02 18:14:40 -0800
commit83367658a01087375ede31ae343c99da03f72ac8 (patch)
tree9cbcb024ab053be392fb8003023fba24a28e6a96 /scripts/stackusage
parent332c1bd17422c1aa59e18513042e56ea5aac4051 (diff)
mm/page_alloc: let the highest memory node recover from hopeless state
free_frozen_page_commit() clears a hopeless node's kswapd failures once its zone recovers above the high watermark, but only if another memory node exists for allocations to fall back to. The test `next_memory_node(nid) < MAX_NUMNODES` finds only memory nodes with a higher id. The highest-numbered memory node therefore never recovers on this path, and its kswapd stays disabled until reclaim on that node makes progress and balances it, or demotion is re-enabled. In many cases, direct reclaim many never fully run against a lower node (CXL/kmem), and that means its kswapd can end up full disabled in rare situations. To reproduce, fill the highest memory node with bound, non-THP anonymous memory and no swap until kswapd gives up, then free it: /proc/zoneinfo keeps showing node_unreclaimable 1 for that node. A lower node recovers. Count the memory nodes instead. Adding first_memory_node != nid to the existing test would also work, but a count says directly what the check means: some other memory node exists. Link: https://lore.kernel.org/20261019184850.3427905-1-gourry@gourry.net Fixes: e7a5f249e6db ("mm: re-enable kswapd when memory pressure subsides or demotion is toggled") Signed-off-by: Gregory Price (Meta) <gourry@gourry.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Zi Yan <ziy@nvidia.com> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Brendan Jackman <brendan.jackman@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Chanwon Park <flyinrm@gmail.com> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions