summaryrefslogtreecommitdiff
path: root/mm/damon
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-09-07 02:29:26 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-10-04 10:32:21 -0700
commit27e68c4b0d5a945d975140315332ea2e7aa2c57b (patch)
tree1836cc1792e70e3b14d6c84b7c18442846fd3693 /mm/damon
parent46158bf211bd557cb7849ff747a5a94d82cd4aa8 (diff)
downloadlwn-27e68c4b0d5a945d975140315332ea2e7aa2c57b.tar.gz
lwn-27e68c4b0d5a945d975140315332ea2e7aa2c57b.zip
mm/damon/core: fix a comment about damon_set_attrs() call timings
The comment on damon_set_attrs() says it should not be called while the kdamond is running, but now some DAMON modules like sysfs interface and DAMON_RECLAIM call it from after_aggregation() and/or after_wmarks_check() callbacks for online tuning. Update the comment. Link: https://lkml.kernel.org/r/20230907022929.91361-9-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
-rw-r--r--mm/damon/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c
index bcd2bd9d6c10..9160a0674aff 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -541,7 +541,11 @@ static void damon_update_monitoring_results(struct damon_ctx *ctx,
* @ctx: monitoring context
* @attrs: monitoring attributes
*
- * This function should not be called while the kdamond is running.
+ * This function should be called while the kdamond is not running, or an
+ * access check results aggregation is not ongoing (e.g., from
+ * &struct damon_callback->after_aggregation or
+ * &struct damon_callback->after_wmarks_check callbacks).
+ *
* Every time interval is in micro-seconds.
*
* Return: 0 on success, negative error code otherwise.