2023-10-12 19:23:31

by SeongJae Park

[permalink] [raw]
Subject: [PATCH 0/3] mm/damon/sysfs-schemes: Do DAMOS tried regions update for only one apply interval

Changes from RFC
(https://lore.kernel.org/damon/[email protected]/)
- Rebase on latest mm-unstable

DAMOS tried regions update feature of DAMON sysfs interface is doing the
update for one aggregation interval after the request is made. Since
the per-scheme apply interval is supported, that behavior makes no much
sense. That is, the tried regions directory will have regions from
multiple DAMON monitoring results snapshots, or no region for apply
intervals that much shorter than, or longer than the aggregation
interval, respectively. Update the behavior to update the regions for
each scheme for only its apply interval, and update the document.

Since DAMOS apply interval is the aggregation by default, this change
makes no visible behavioral difference to old users who don't explicitly
set the apply intervals.

Patches Sequence
----------------

The first two patches makes schemes of apply intervals that much shorter
or longer than the aggregation interval to keep the maximum and minimum
times for continuing the update. After the two patches, the update
aligns with the each scheme's apply interval.

Finally, the third patch updates the document to reflect the behavior.

SeongJae Park (3):
mm/damon/sysfs-schemes: do not update tried regions more than one
DAMON snapshot
mm/damon/sysfs: avoid empty scheme tried regions for large apply
interval
Docs/admin-guide/mm/damon/usage: update for tried regions update time
interval

Documentation/admin-guide/mm/damon/usage.rst | 6 +-
mm/damon/sysfs-common.h | 2 +
mm/damon/sysfs-schemes.c | 93 ++++++++++++++++++++
mm/damon/sysfs.c | 34 ++++++-
4 files changed, 128 insertions(+), 7 deletions(-)


base-commit: 937421b2a4e95c57fddf10477b949fa5693711da
--
2.34.1


2023-10-12 19:23:39

by SeongJae Park

[permalink] [raw]
Subject: [PATCH 3/3] Docs/admin-guide/mm/damon/usage: update for tried regions update time interval

The documentation says DAMOS tried regions update feature of DAMON sysfs
interface is doing the update for one aggregation interval after the
request is made. Since the introduction of the per-scheme apply
interval, that behavior makes no much sense. Hence the implementation
has changed to update the regions for each scheme for only its apply
interval. Further update the document to reflect the real behavior.

Signed-off-by: SeongJae Park <[email protected]>
---
Documentation/admin-guide/mm/damon/usage.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 8507a6e45d86..da94feb97ed1 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -432,9 +432,9 @@ that reading it returns the total size of the scheme tried regions, and creates
directories named integer starting from ``0`` under this directory. Each
directory contains files exposing detailed information about each of the memory
region that the corresponding scheme's ``action`` has tried to be applied under
-this directory, during next :ref:`aggregation interval
-<sysfs_monitoring_attrs>`. The information includes address range,
-``nr_accesses``, and ``age`` of the region.
+this directory, during next :ref:`apply interval <damon_design_damos>` of the
+corresponding scheme. The information includes address range, ``nr_accesses``,
+and ``age`` of the region.

Writing ``update_schemes_tried_bytes`` to the relevant ``kdamonds/<N>/state``
file will only update the ``total_bytes`` file, and will not create the
--
2.34.1