]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/damon/core: fix a comment about damon_set_attrs() call timings
authorSeongJae Park <sj@kernel.org>
Thu, 7 Sep 2023 02:29:26 +0000 (02:29 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:21 +0000 (10:32 -0700)
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>
mm/damon/core.c

index bcd2bd9d6c104f234f699a236e2e40f83cd19a07..9160a0674affc9d45b7083f273a0682ebe056f69 100644 (file)
@@ -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.