From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [RFC PATCH 4/8] mm/damon/sysfs: commit intervals tuning goal
Date: Wed, 12 Feb 2025 17:44:34 -0800 [thread overview]
Message-ID: <20250213014438.145611-5-sj@kernel.org> (raw)
In-Reply-To: <20250213014438.145611-1-sj@kernel.org>
Connect DAMON sysfs interface for sampling and aggregation intervals
auto-tuning with DAMON core API, so that users can really use the
feature using the sysfs files.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/sysfs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index ff774cc19d1f..f9bfe9ea0ae6 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1273,11 +1273,18 @@ static int damon_sysfs_set_attrs(struct damon_ctx *ctx,
struct damon_sysfs_attrs *sys_attrs)
{
struct damon_sysfs_intervals *sys_intervals = sys_attrs->intervals;
+ struct damon_sysfs_intervals_goal *sys_goal =
+ sys_intervals->intervals_goal;
struct damon_sysfs_ul_range *sys_nr_regions =
sys_attrs->nr_regions_range;
struct damon_attrs attrs = {
.sample_interval = sys_intervals->sample_us,
.aggr_interval = sys_intervals->aggr_us,
+ .intervals_goal = {
+ .samples_bp = sys_goal->samples_bp,
+ .aggrs = sys_goal->aggrs,
+ .min_sample_us = sys_goal->min_sample_us,
+ .max_sample_us = sys_goal->max_sample_us},
.ops_update_interval = sys_intervals->update_us,
.min_nr_regions = sys_nr_regions->min,
.max_nr_regions = sys_nr_regions->max,
--
2.39.5
next prev parent reply other threads:[~2025-02-13 1:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 1:44 [RFC PATCH 0/8] mm/damon: auto-tune aggregation interval SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 1/8] mm/damon: add data structure for monitoring intervals auto-tuning SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 2/8] mm/damon/core: implement " SeongJae Park
2025-02-25 18:14 ` SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 3/8] mm/damon/sysfs: implement intervals tuning goal directory SeongJae Park
2025-02-13 1:44 ` SeongJae Park [this message]
2025-02-13 1:44 ` [RFC PATCH 5/8] mm/damon/sysfs: implement a command to update auto-tuned monitoring intervals SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 6/8] Docs/mm/damon/design: document for intervals auto-tuning SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 7/8] Docs/ABI/damon: document intervals auto-tuning ABI SeongJae Park
2025-02-13 1:44 ` [RFC PATCH 8/8] Docs/admin-guide/mm/damon/usage: add intervals_goal directory on the hierarchy SeongJae Park
2025-02-21 1:09 ` [RFC PATCH 0/8] mm/damon: auto-tune aggregation interval SeongJae 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=20250213014438.145611-5-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--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