DAMON development mailing list
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
Cc: SJ Park <sj@kernel.org>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [RFC PATCH 04/10] mm/damon/core: hide private damos_quota fields
Date: Mon, 13 Jul 2026 21:34:30 -0700	[thread overview]
Message-ID: <20260714043437.95811-5-sj@kernel.org> (raw)
In-Reply-To: <20260714043437.95811-1-sj@kernel.org>

damos_quota->goals is intended to be used by only the DAMON core layer.
But it is mistakenly not marked as private.  Mark as private.

Signed-off-by: SJ Park <sj@kernel.org>
---
 include/linux/damon.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index d838cc27ee72a..bd024b89adfa3 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -228,7 +228,6 @@ enum damos_quota_goal_tuner {
  * @reset_interval:	Charge reset interval in milliseconds.
  * @ms:			Maximum milliseconds that the scheme can use.
  * @sz:			Maximum bytes of memory that the action can be applied.
- * @goals:		Head of quota tuning goals (&damos_quota_goal) list.
  * @goal_tuner:		Goal-based @esz tuning algorithm to use.
  * @esz:		Effective size quota in bytes.
  * @fail_charge_num:	Failed regions charge rate numerator.
@@ -255,7 +254,7 @@ enum damos_quota_goal_tuner {
  * the scheme's action.  DAMON then compares it against &sz and uses smaller
  * one as the effective quota.
  *
- * If @goals is not empty, DAMON calculates yet another size quota based on the
+ * If goals is not empty, DAMON calculates yet another size quota based on the
  * goals using its internal feedback loop algorithm, for every @reset_interval.
  * Then, if the new size quota is smaller than the effective quota, it uses the
  * new size quota as the effective quota.
@@ -276,7 +275,7 @@ struct damos_quota {
 	unsigned long reset_interval;
 	unsigned long ms;
 	unsigned long sz;
-	struct list_head goals;
+
 	enum damos_quota_goal_tuner goal_tuner;
 	unsigned long esz;
 
@@ -288,6 +287,8 @@ struct damos_quota {
 	unsigned int weight_age;
 
 /* private: */
+	/* Head of quota tuning goals (&damos_quota_goal) list. */
+	struct list_head goals;
 	/* For throughput estimation */
 	unsigned long total_charged_sz;
 	unsigned long total_charged_ns;
-- 
2.47.3

  parent reply	other threads:[~2026-07-14  4:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  4:34 [RFC PATCH 00/10] mm/damon/core: hide core-private struct fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 01/10] mm/damon/core: hide private damon_region fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 02/10] mm/damon/core: hide private damon_target fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 03/10] mm/damon/core: hide private damos_quota_goal fields SJ Park
2026-07-14  4:34 ` SJ Park [this message]
2026-07-14  4:34 ` [RFC PATCH 05/10] mm/damon/core: hide private damos_filter fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 06/10] mm/damon/core: hide private damos fields SJ Park
2026-07-14  4:52   ` sashiko-bot
2026-07-14  5:54     ` SJ Park
2026-07-14  6:16       ` SJ Park
2026-07-14  4:34 ` [RFC PATCH 07/10] mm/damon/core: hide private damon_filter fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 08/10] mm/damon/core: hide private damon_probe fields SJ Park
2026-07-14  4:34 ` [RFC PATCH 09/10] mm/damon/sysfs: do not directly access damon_ctx->ops SJ Park
2026-07-14  4:34 ` [RFC PATCH 10/10] mm/damon/core: hide core-private damon_ctx fields SJ 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=20260714043437.95811-5-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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