Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Karthikeyan KS <karthiproffesional@gmail.com>,
	Adrian Huang <adrianhuang0701@gmail.com>,
	Liew Rui Yan <aethernet65535@gmail.com>, SJ Park <sj@kernel.org>,
	Xuewen Wang <wangxuewen@kylinos.cn>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [PATCH 4/4] mm/damon: document that a zero sample_interval is accepted
Date: Mon, 21 Sep 2026 08:15:46 -0700	[thread overview]
Message-ID: <20260921151547.78472-5-sj@kernel.org> (raw)
In-Reply-To: <20260921151547.78472-1-sj@kernel.org>

From: Karthikeyan KS <karthiproffesional@gmail.com>

damon_set_attrs() accepts sample_interval == 0.  This was reported as a
bug in v1 of this patch (rejecting it in damon_set_attrs()).  A similar
patch was already declined for the same reason: a zero interval is
intentionally supported [1].

Document the behavior instead of changing it.

[1] https://lore.kernel.org/all/20260722094304.3132750-1-dayou5941@163.com/

Signed-off-by: Karthikeyan KS <karthiproffesional@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Signed-off-by: SJ Park <sj@kernel.org>
---
Changes from v2
- v2: https://lore.kernel.org/20260918131301.75879-1-karthiproffesional@gmail.com
- Collect R-b: from SJ.
- Rebas to the latest mm-new.
Changes from v1:
- Dropped the damon_set_attrs() rejection and the KUnit cases that
  tested it.
- Added a kernel-doc note on struct damon_attrs's @sample_interval
  instead.

 include/linux/damon.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 836353c4ab9a..844b175120f0 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -836,7 +836,8 @@ struct damon_probe {
 /**
  * struct damon_attrs - Monitoring attributes for accuracy/overhead control.
  *
- * @sample_interval:		The time between access samplings.
+ * @sample_interval:		The time between access samplings.  Zero is
+ *				accepted.
  * @aggr_interval:		The time between monitor results aggregations.
  * @ops_update_interval:	The time between monitoring operations updates.
  * @intervals_goal:		Intervals auto-tuning goal.
-- 
2.47.3


      parent reply	other threads:[~2026-09-21 15:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 15:15 [PATCH 0/4] mm/damon: improvements in efficiency, error handling, documents SJ Park
2026-09-21 15:15 ` [PATCH 1/4] mm/damon/core: skip quota score setup when the quota is full SJ Park
2026-09-21 15:15 ` [PATCH 2/4] mm/damon/sysfs: propagate damon_call() error in turn_damon_on SJ Park
2026-09-21 15:15 ` [PATCH 3/4] mm/damon: fix typos in comments SJ Park
2026-09-21 15:15 ` SJ Park [this message]

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=20260921151547.78472-5-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=adrianhuang0701@gmail.com \
    --cc=aethernet65535@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=karthiproffesional@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wangxuewen@kylinos.cn \
    /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