From: Jonghyeon Kim <tome01@ajou.ac.kr>
To: SeongJae Park <sj@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Jonghyeon Kim <tome01@ajou.ac.kr>
Subject: [RFC PATCH v2 2/3] mm/damon: add module parameters for NUMA system
Date: Mon, 20 May 2024 14:30:37 +0000 [thread overview]
Message-ID: <20240520143038.189061-3-tome01@ajou.ac.kr> (raw)
In-Reply-To: <20240520143038.189061-1-tome01@ajou.ac.kr>
This patch implements support NUMA-aware DAMON modules by adding kernel
module parameters. With this patch, DAMON_RECLAIM and DAMON_LRU_SORT can
use this feature.
Signed-off-by: Jonghyeon Kim <tome01@ajou.ac.kr>
---
mm/damon/lru_sort.c | 1 +
mm/damon/modules-common.h | 4 +++-
mm/damon/reclaim.c | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 3de2916a6..3e25a52de 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -81,6 +81,7 @@ static struct damos_watermarks damon_lru_sort_wmarks = {
.high = 200, /* 20 percent */
.mid = 150, /* 15 percent */
.low = 50, /* 5 percent */
+ .target_nid = NUMA_NO_NODE,
};
DEFINE_DAMON_MODULES_WMARKS_PARAMS(damon_lru_sort_wmarks);
diff --git a/mm/damon/modules-common.h b/mm/damon/modules-common.h
index f49cdb417..b167bb24a 100644
--- a/mm/damon/modules-common.h
+++ b/mm/damon/modules-common.h
@@ -27,11 +27,13 @@
module_param_named(quota_sz, quota.sz, ulong, 0600);
#define DEFINE_DAMON_MODULES_WMARKS_PARAMS(wmarks) \
+ module_param_named(metric, wmarks.metric, uint, 0600); \
module_param_named(wmarks_interval, wmarks.interval, ulong, \
0600); \
module_param_named(wmarks_high, wmarks.high, ulong, 0600); \
module_param_named(wmarks_mid, wmarks.mid, ulong, 0600); \
- module_param_named(wmarks_low, wmarks.low, ulong, 0600);
+ module_param_named(wmarks_low, wmarks.low, ulong, 0600); \
+ module_param_named(target_nid, wmarks.target_nid, int, 0600);
#define DEFINE_DAMON_MODULES_DAMOS_STATS_PARAMS(stat, try_name, \
succ_name, qt_exceed_name) \
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index 66e190f03..31b8830a8 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -68,6 +68,7 @@ static struct damos_watermarks damon_reclaim_wmarks = {
.high = 500, /* 50 percent */
.mid = 400, /* 40 percent */
.low = 200, /* 20 percent */
+ .target_nid = NUMA_NO_NODE,
};
DEFINE_DAMON_MODULES_WMARKS_PARAMS(damon_reclaim_wmarks);
--
2.34.1
next prev parent reply other threads:[~2024-05-20 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 14:30 [RFC PATCH v2 0/3] Add NUMA-aware DAMOS watermarks Jonghyeon Kim
2024-05-20 14:30 ` [RFC PATCH v2 1/3] mm/damon: Add new metric type and target node for watermark Jonghyeon Kim
2024-05-20 14:30 ` Jonghyeon Kim [this message]
2024-05-20 14:30 ` [RFC PATCH v2 3/3] mm/damon: add NUMA-awareness to DAMON modules Jonghyeon Kim
2024-05-22 1:00 ` [RFC PATCH v2 0/3] Add NUMA-aware DAMOS watermarks SeongJae Park
2024-05-24 5:24 ` Jonghyeon Kim
2024-05-25 17:47 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240520143038.189061-3-tome01@ajou.ac.kr \
--to=tome01@ajou.ac.kr \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox