linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/12] mm/damos/stat: introduce nr_snapshots, max_nr_snapshots and tracepoint
@ 2025-11-23 18:43 SeongJae Park
  2025-11-23 18:43 ` [RFC PATCH 01/12] mm/damon/core: introduce nr_snapshots damos stat SeongJae Park
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: SeongJae Park @ 2025-11-23 18:43 UTC (permalink / raw)
  Cc: SeongJae Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
	Jonathan Corbet, Lorenzo Stoakes, Masami Hiramatsu,
	Mathieu Desnoyers, Michal Hocko, Mike Rapoport, Steven Rostedt,
	Suren Baghdasaryan, Vlastimil Babka, damon, linux-doc,
	linux-kernel, linux-mm, linux-trace-kernel

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-11-24 15:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-23 18:43 [RFC PATCH 00/12] mm/damos/stat: introduce nr_snapshots, max_nr_snapshots and tracepoint SeongJae Park
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox