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 00/13] mm/damon/sysfs: commit parameters online via damon_call()
Date: Tue, 25 Feb 2025 22:36:38 -0800 [thread overview]
Message-ID: <20250226063651.513178-1-sj@kernel.org> (raw)
Due to the lack of ways to synchronously access DAMON internal data,
DAMON sysfs interface is using damon_callback hooks with its own
synchronization mechanism. The mechanism is built on top of
damon_callback hooks in an ineifficient and complicated way.
Patch series "mm/damon: replace most damon_callback usages in sysfs with
new core functions", which starts with commit e035320fd38e
("mm/damon/sysfs-schemes: remove unnecessary schemes existence check in
damon_sysfs_schemes_clear_regions()") introduced two new DAMON kernel
API functions that providing the synchronous access, replaced most
damon_callback hooks usage in DAMON sysfs interface, and cleaned up
unnecessary code.
Continue the replacement and cleanup works. Update the last DAMON
sysfs's usage of its own synchronization mechanism, namely online DAMON
parameters commit, to use damon_call() instead of the damon_callback
hooks and the hard-to-maintain own synchronization mechanism. Then
remove the no more be used code due to the change, and more unused code
that just not yet cleaned up.
The first four patches of this series do the replacement. Then,
following three patches (patches 5-7) remove the DAMON sysfs interface'
own synchronization mechanism and its usages, which is no more be used
by anyone due to the first four patches. Finally, six patches (8-13)
doing more cleanup of no more valid comment and no more used code
follow.
SeongJae Park (13):
mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input()
mm/damon/core: invoke kdamond_call() after merging is done if possible
mm/damon/core: make damon_set_attrs() be safe to be called from
damon_call()
mm/damon/sysfs: handle commit command using damon_call()
mm/damon/sysfs: remove damon_sysfs_cmd_request code from
damon_sysfs_handle_cmd()
mm/damon/sysfs: remove damon_sysfs_cmd_request_callback() and its
callers
mm/damon/sysfs: remove damon_sysfs_cmd_request and its readers
mm/damon/sysfs-schemes: remove obsolete comment for
damon_sysfs_schemes_clear_regions()
mm/damon: remove damon_callback->private
mm/damon: remove ->before_start of damon_callback
mm/damon: remove damon_callback->after_sampling
mm/damon: remove damon_callback->before_damos_apply
mm/damon: remove damon_operations->reset_aggregated
include/linux/damon.h | 34 ++-------
mm/damon/core.c | 64 ++++++++--------
mm/damon/paddr.c | 1 -
mm/damon/sysfs-schemes.c | 1 -
mm/damon/sysfs.c | 147 +++++-------------------------------
mm/damon/tests/core-kunit.h | 6 +-
mm/damon/vaddr.c | 1 -
7 files changed, 61 insertions(+), 193 deletions(-)
base-commit: 58f3b385bf3ed67fa989e13620dae8331df515d7
--
2.39.5
next reply other threads:[~2025-02-26 6:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 6:36 SeongJae Park [this message]
2025-02-26 6:36 ` [RFC PATCH 01/13] mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input() SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 02/13] mm/damon/core: invoke kdamond_call() after merging is done if possible SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 03/13] mm/damon/core: make damon_set_attrs() be safe to be called from damon_call() SeongJae Park
2025-03-02 21:41 ` SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 04/13] mm/damon/sysfs: handle commit command using damon_call() SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 05/13] mm/damon/sysfs: remove damon_sysfs_cmd_request code from damon_sysfs_handle_cmd() SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 06/13] mm/damon/sysfs: remove damon_sysfs_cmd_request_callback() and its callers SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 07/13] mm/damon/sysfs: remove damon_sysfs_cmd_request and its readers SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 08/13] mm/damon/sysfs-schemes: remove obsolete comment for damon_sysfs_schemes_clear_regions() SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 09/13] mm/damon: remove damon_callback->private SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 10/13] mm/damon: remove ->before_start of damon_callback SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 11/13] mm/damon: remove damon_callback->after_sampling SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 12/13] mm/damon: remove damon_callback->before_damos_apply SeongJae Park
2025-02-26 6:36 ` [RFC PATCH 13/13] mm/damon: remove damon_operations->reset_aggregated 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=20250226063651.513178-1-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