[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260107072814.2324646-1-bingjiao@google.com>
Date: Wed, 7 Jan 2026 07:28:12 +0000
From: Bing Jiao <bingjiao@...gle.com>
To: linux-mm@...ck.org
Cc: Bing Jiao <bingjiao@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>, David Hildenbrand <david@...nel.org>, Michal Hocko <mhocko@...nel.org>,
Qi Zheng <zhengqi.arch@...edance.com>, Shakeel Butt <shakeel.butt@...ux.dev>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Axel Rasmussen <axelrasmussen@...gle.com>,
Yuanchu Xie <yuanchu@...gle.com>, Wei Xu <weixugc@...gle.com>, linux-kernel@...r.kernel.org
Subject: [PATCH v1 0/2] mm/vmscan: optimize preferred target demotion node selection
In tiered memory systems, the demotion aims to move cold folios to the
far-tier nodes. To maintain system performance, the demotion target
should ideally be the node with the shortest NUMA distance from the
source node.
However, the current implementation has two suboptimal behaviors:
1. Unbalanced Fallback: When the primary preferred demotion node is full,
the allocator falls back to other nodes in a way that often skews
toward zones that closer to the primary preferred node rather than
distributing the load evenly across fallback nodes.
2. Suboptimal Target Selection: demote_folio_list() randomly select
a preferred node from the allowed mask, potentially selecting
a very distant node.
This series optimizes the selection logic while ensuring balanced
allocation across fallback nodes.
Patch 1/2 introduces a randomized fallback mechanism in
alloc_demote_folio() to prevent allocation hotspots when the preferred
node is under memory pressure.
Patch 2/2 updates demote_folio_list() to traverse the demotion targets
hierarchically, ensuring the perferred target is always the closest
available node.
Dependencies:
1. Patch 1/2 has no dependencies.
2. Patch 2/2 depends on commit d7138516fb5c ("mm/vmscan: fix demotion
targets checks in reclaim/demotion").
Bing Jiao (2):
mm/vmscan: balance demotion allocation in alloc_demote_folio()
mm/vmscan: select the optimal perferred node in demote_folio_list()
mm/vmscan.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
--
2.52.0.358.g0dd7633a29-goog
Powered by blists - more mailing lists