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 1/6] mm/damon/api: introduce DAMOS_FILTER_TYPE_PROBE_HITS_WSUM
Date: Sun, 6 Sep 2026 14:05:07 -0700 [thread overview]
Message-ID: <20260906210513.106895-2-sj@kernel.org> (raw)
In-Reply-To: <20260906210513.106895-1-sj@kernel.org>
Update DAMON kernel API to introduce new DAMOS core filter type,
PROBE_HITS_WSUM. It will allow API callers to describe the DAMOS action
target regions based on their probe_hits weighted sum. For describing
the filtering target weighted sum range, add two type-dependent union
fields to damos_filter.
Signed-off-by: SJ Park <sj@kernel.org>
---
include/linux/damon.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 871d26adf6ae5..59d57131d8327 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -399,6 +399,7 @@ struct damos_stat {
* @DAMOS_FILTER_TYPE_UNMAPPED: Unmapped pages.
* @DAMOS_FILTER_TYPE_ADDR: Address range.
* @DAMOS_FILTER_TYPE_TARGET: Data Access Monitoring target.
+ * @DAMOS_FILTER_TYPE_PROBE_HITS_WSUM: probe_hits weighted sum range.
* @NR_DAMOS_FILTER_TYPES: Number of filter types.
*
* All types except &DAMOS_FILTER_TYPE_ADDR and &DAMOS_FILTER_TYPE_TARGET
@@ -420,6 +421,7 @@ enum damos_filter_type {
DAMOS_FILTER_TYPE_UNMAPPED,
DAMOS_FILTER_TYPE_ADDR,
DAMOS_FILTER_TYPE_TARGET,
+ DAMOS_FILTER_TYPE_PROBE_HITS_WSUM,
NR_DAMOS_FILTER_TYPES,
};
@@ -434,6 +436,8 @@ enum damos_filter_type {
* &damon_ctx->adaptive_targets if @type is
* DAMOS_FILTER_TYPE_TARGET.
* @sz_range: Size range if @type is DAMOS_FILTER_TYPE_HUGEPAGE_SIZE.
+ * @range_min: Minimum value of range arguments.
+ * @range_mx: Maximum value of range arguments.
*
* Before applying the &damos->action to a memory region, DAMOS checks if each
* byte of the region matches to this given condition and avoid applying the
@@ -450,6 +454,10 @@ struct damos_filter {
struct damon_addr_range addr_range;
int target_idx;
struct damon_size_range sz_range;
+ struct {
+ unsigned long range_min;
+ unsigned long range_max;
+ };
};
/* private: */
/* List head for siblings. */
--
2.47.3
next prev parent reply other threads:[~2026-09-06 21:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 21:05 [RFC PATCH 0/6] mm/damon: introduce probe_hits_wsum DAMOS core filter SJ Park
2026-09-06 21:05 ` SJ Park [this message]
2026-09-06 21:05 ` [RFC PATCH 2/6] mm/damon/core: support probe_hits_wsum damos " SJ Park
2026-09-06 21:05 ` [RFC PATCH 3/6] mm/damon/sysfs-schemes: rename sysfs_filter->sz_range to range_{min,max} SJ Park
2026-09-06 21:05 ` [RFC PATCH 4/6] mm/damon/sysfs-schemes: setup range_{min,max} for probe_hits_wsum filter SJ Park
2026-09-06 21:05 ` [RFC PATCH 5/6] Docs/mm/damon/design: update for probe_hits_wsum DAMOS core filter SJ Park
2026-09-06 21:05 ` [RFC PATCH 6/6] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter 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=20260906210513.106895-2-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
all inboxes | Powered by JetHome®