* [merged mm-stable] mm-damon-reclaim-use-watermarks-parameters-generator-macro.patch removed from -mm tree
@ 2022-10-03 21:07 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-03 21:07 UTC (permalink / raw)
To: mm-commits, sj, akpm
The quilt patch titled
Subject: mm/damon/reclaim: use watermarks parameters generator macro
has been removed from the -mm tree. Its filename was
mm-damon-reclaim-use-watermarks-parameters-generator-macro.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: SeongJae Park <sj@kernel.org>
Subject: mm/damon/reclaim: use watermarks parameters generator macro
Date: Tue, 13 Sep 2022 17:44:41 +0000
This commit makes DAMON_RECLAIM to generate the module parameters for
DAMOS watermarks using the generator macro to simplify the code and reduce
duplicates.
Link: https://lkml.kernel.org/r/20220913174449.50645-15-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/damon/reclaim.c | 56 ++++++-------------------------------------
1 file changed, 9 insertions(+), 47 deletions(-)
--- a/mm/damon/reclaim.c~mm-damon-reclaim-use-watermarks-parameters-generator-macro
+++ a/mm/damon/reclaim.c
@@ -91,45 +91,14 @@ module_param(quota_sz, ulong, 0600);
static unsigned long quota_reset_interval_ms __read_mostly = 1000;
module_param(quota_reset_interval_ms, ulong, 0600);
-/*
- * The watermarks check time interval in microseconds.
- *
- * Minimal time to wait before checking the watermarks, when DAMON_RECLAIM is
- * enabled but inactive due to its watermarks rule. 5 seconds by default.
- */
-static unsigned long wmarks_interval __read_mostly = 5000000;
-module_param(wmarks_interval, ulong, 0600);
-
-/*
- * Free memory rate (per thousand) for the high watermark.
- *
- * If free memory of the system in bytes per thousand bytes is higher than
- * this, DAMON_RECLAIM becomes inactive, so it does nothing but periodically
- * checks the watermarks. 500 (50%) by default.
- */
-static unsigned long wmarks_high __read_mostly = 500;
-module_param(wmarks_high, ulong, 0600);
-
-/*
- * Free memory rate (per thousand) for the middle watermark.
- *
- * If free memory of the system in bytes per thousand bytes is between this and
- * the low watermark, DAMON_RECLAIM becomes active, so starts the monitoring
- * and the reclaiming. 400 (40%) by default.
- */
-static unsigned long wmarks_mid __read_mostly = 400;
-module_param(wmarks_mid, ulong, 0600);
-
-/*
- * Free memory rate (per thousand) for the low watermark.
- *
- * If free memory of the system in bytes per thousand bytes is lower than this,
- * DAMON_RECLAIM becomes inactive, so it does nothing but periodically checks
- * the watermarks. In the case, the system falls back to the LRU-based page
- * granularity reclamation logic. 200 (20%) by default.
- */
-static unsigned long wmarks_low __read_mostly = 200;
-module_param(wmarks_low, ulong, 0600);
+struct damos_watermarks damon_reclaim_wmarks = {
+ .metric = DAMOS_WMARK_FREE_MEM_RATE,
+ .interval = 5000000, /* 5 seconds */
+ .high = 500, /* 50 percent */
+ .mid = 400, /* 40 percent */
+ .low = 200, /* 20 percent */
+};
+DEFINE_DAMON_MODULES_WMARKS_PARAMS(damon_reclaim_wmarks);
static struct damon_attrs damon_reclaim_mon_attrs = {
.sample_interval = 5000, /* 5 ms */
@@ -214,13 +183,6 @@ static struct damos *damon_reclaim_new_s
damon_reclaim_mon_attrs.aggr_interval,
.max_age_region = UINT_MAX,
};
- struct damos_watermarks wmarks = {
- .metric = DAMOS_WMARK_FREE_MEM_RATE,
- .interval = wmarks_interval,
- .high = wmarks_high,
- .mid = wmarks_mid,
- .low = wmarks_low,
- };
struct damos_quota quota = {
/*
* Do not try reclamation for more than quota_ms milliseconds
@@ -242,7 +204,7 @@ static struct damos *damon_reclaim_new_s
/* under the quota. */
"a,
/* (De)activate this according to the watermarks. */
- &wmarks);
+ &damon_reclaim_wmarks);
}
static int damon_reclaim_apply_parameters(void)
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-core-initialize-damon_target-list-in-damon_new_target.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-03 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-03 21:07 [merged mm-stable] mm-damon-reclaim-use-watermarks-parameters-generator-macro.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.