[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250528111038.18378-1-wangchuanguo@inspur.com>
Date: Wed, 28 May 2025 19:10:36 +0800
From: wangchuanguo <wangchuanguo@...pur.com>
To: <akpm@...ux-foundation.org>, <hannes@...xchg.org>, <sj@...nel.org>
CC: <david@...hat.com>, <mhocko@...nel.org>, <zhengqi.arch@...edance.com>,
<shakeel.butt@...ux.dev>, <lorenzo.stoakes@...cle.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>, <damon@...ts.linux.dev>, wangchuanguo
<wangchuanguo@...pur.com>
Subject: [PATCH 0/2] add a knob to control whether to use other nodes at the same tier of the target node in DAMON
In DAMON's migrate_hot and migrate_cold features, the code was
intended to migrate pages only to the node specified by target_nid.
However, during testing, it was observed that memory allocation
and migration could occur on any nodes, which is a BUG.
The first patch in this PR fix this issue.
A use_nodes_of_tier file has been added under the directory /sys/kernel/mm/damon/admin/kdamonds/<N>/contexts/<N>/schemes/<N>/
to control whether to use other nodes in the same tier as
the target node for migration.
wangchuanguo (2):
mm: migrate: restore the nmask after successfully allocating on the
target node
mm/damon/sysfs-schemes: add use_nodes_of_tier on sysfs-schemes
include/linux/damon.h | 9 ++++++++-
include/linux/memory-tiers.h | 5 +++++
mm/damon/core.c | 6 ++++--
mm/damon/lru_sort.c | 3 ++-
mm/damon/paddr.c | 19 ++++++++++++-------
mm/damon/reclaim.c | 3 ++-
mm/damon/sysfs-schemes.c | 31 ++++++++++++++++++++++++++++++-
mm/memory-tiers.c | 13 +++++++++++++
mm/vmscan.c | 2 +-
samples/damon/mtier.c | 3 ++-
samples/damon/prcl.c | 3 ++-
11 files changed, 81 insertions(+), 16 deletions(-)
--
2.39.3
Powered by blists - more mailing lists