From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Michal Hocko <mhocko@suse.com>, Mike Rapoport <rppt@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
damon@lists.linux.dev, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-trace-kernel@vger.kernel.org
Subject: [RFC PATCH 00/12] mm/damos/stat: introduce nr_snapshots, max_nr_snapshots and tracepoint
Date: Sun, 23 Nov 2025 10:43:14 -0800 [thread overview]
Message-ID: <20251123184329.85287-1-sj@kernel.org> (raw)
Introduce three changes for improving DAMOS stat's provided information,
deterministic control, and reading usability.
DAMOS provides stats that are important for understanding its behavior.
It lacks information about how many DAMON-generated monitoring output
snapshots it has worked on. Add a new stat, nr_snapshots, to show the
information.
Users can control DAMOS schemes in multiple ways. Using the online
parameters commit feature, they can install and uninstall DAMOS schemes
whenever they want while keeping DAMON runs. DAMOS quotas and
watermarks can be used for manually or automatically turning on/off or
adjusting the aggressiveness of the scheme. DAMOS filters can be used
for applying the scheme to specific memory entities based on their types
and locations. Some users want their DAMOS scheme to be applied to only
specific number of DAMON snapshots, for more deterministic control. One
example use case is tracepoint based snapshot reading. Add a new knob,
max_nr_snapshots, to support this. If the nr_snapshots parameter
becomes same to or greater than the value of this parameter, the scheme
is deactivated.
Users can read DAMOS stats via DAMON's sysfs interface. For deep level
investigations on environments having advanced tools like perf and
bpftrace, exposing the stats via a tracepoint can be useful. Implement
a new tracepoint, namely damon:damos_stat_after_apply_interval.
First five patches (patches 1-5) of this series implement the new stat,
nr_snapshots, on the core layer (patch 1), expose on DAMON sysfs user
interface (patch 2), and update documents (patches 3-5).
Following six patches (patches 6-11) are for the new stat based DAMOS
deactivation (max_nr_snapshots). The first one (patch 6) of this group
updates a kernel-doc comment before making further changes. Then an
implementation of it on the core layer (patch 7), an introduction of a
new DAMON sysfs interface file for users of the feature (patch 8), and
three updates of the documents (patches 9-11) follow.
The final one (patch 12) introduces the new tracepoint that exposes the
DAMOS stat values for each scheme apply interval.
SeongJae Park (12):
mm/damon/core: introduce nr_snapshots damos stat
mm/damon/sysfs-schemes: introduce nr_snapshots damos stat file
Docs/mm/damon/design: update for nr_snapshots damos stat
Docs/admin-guide/mm/damon/usage: update for nr_snapshots damos stat
Docs/ABI/damon: update for nr_snapshots damos stat
mm/damon: update damos kerneldoc for stat field
mm/damon/core: implement max_nr_snapshots
mm/damon/sysfs-schemes: implement max_nr_snapshots file
Docs/mm/damon/design: update for max_nr_snapshots
Docs/admin-guide/mm/damon/usage: update for max_nr_snapshots
Docs/ABI/damon: update for max_nr_snapshots
mm/damon/core: add trace point for damos stat per apply interval
.../ABI/testing/sysfs-kernel-mm-damon | 13 ++++++
Documentation/admin-guide/mm/damon/usage.rst | 11 ++---
Documentation/mm/damon/design.rst | 7 +++
include/linux/damon.h | 12 ++++--
include/trace/events/damon.h | 41 ++++++++++++++++++
mm/damon/core.c | 37 ++++++++++++++--
mm/damon/sysfs-schemes.c | 43 +++++++++++++++++++
7 files changed, 153 insertions(+), 11 deletions(-)
base-commit: 522f1a9fc5f1f0a11af39ba5bedae446322ca0a2
--
2.47.3
next reply other threads:[~2025-11-23 18:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 18:43 SeongJae Park [this message]
2025-11-23 18:43 ` [RFC PATCH 01/12] mm/damon/core: introduce nr_snapshots damos stat SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 02/12] mm/damon/sysfs-schemes: introduce nr_snapshots damos stat file SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 03/12] Docs/mm/damon/design: update for nr_snapshots damos stat SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 04/12] Docs/admin-guide/mm/damon/usage: " SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 05/12] Docs/ABI/damon: " SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 06/12] mm/damon: update damos kerneldoc for stat field SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 07/12] mm/damon/core: implement max_nr_snapshots SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 08/12] mm/damon/sysfs-schemes: implement max_nr_snapshots file SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 09/12] Docs/mm/damon/design: update for max_nr_snapshots SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 10/12] Docs/admin-guide/mm/damon/usage: " SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 11/12] Docs/ABI/damon: " SeongJae Park
2025-11-23 18:43 ` [RFC PATCH 12/12] mm/damon/core: add trace point for damos stat per apply interval SeongJae Park
2025-11-24 15:15 ` Steven Rostedt
2025-11-24 15:37 ` SeongJae Park
2025-11-23 19:54 ` [RFC PATCH 00/12] mm/damos/stat: introduce nr_snapshots, max_nr_snapshots and tracepoint 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=20251123184329.85287-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=david@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mhocko@suse.com \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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