From: Karthikeyan KS <karthiproffesional@gmail.com>
To: SJ Park <sj@kernel.org>
Cc: Sang-Heon Jeon <ekffu200098@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Karthikeyan KS <karthiproffesional@gmail.com>
Subject: [PATCH v2] mm/damon: document that a zero sample_interval is accepted
Date: Fri, 18 Sep 2026 13:13:01 +0000 [thread overview]
Message-ID: <20260918131301.75879-1-karthiproffesional@gmail.com> (raw)
In-Reply-To: <20260918023859.13556-1-sj@kernel.org>
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>
---
Hi SJ,
> I'd prefer adding a comment saying zero sampling interval is
> accepted. I think damon_attr kernel-doc comment is a good place
> for adding that.
Adding comments instead of code changes. Let me know if you'd
rather the wording live somewhere else, or be phrased differently.
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.
Thanks,
Karthikeyan KS
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 0c8b7ddef9ab..1a7ef416ec46 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -787,7 +787,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.34.1
next prev parent reply other threads:[~2026-09-18 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 15:06 [PATCH] mm/damon: reject zero sampling interval Karthikeyan KS
2026-09-17 16:09 ` Sang-Heon Jeon
2026-09-17 18:00 ` Karthikeyan KS
2026-09-18 2:38 ` SeongJae Park
2026-09-18 13:13 ` Karthikeyan KS [this message]
2026-09-18 13:35 ` [PATCH v2] mm/damon: document that a zero sample_interval is accepted SJ Park
2026-09-18 17:07 ` Karthikeyan KS
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=20260918131301.75879-1-karthiproffesional@gmail.com \
--to=karthiproffesional@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=ekffu200098@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.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
all inboxes | Powered by JetHome®