* [PATCH v3 0/3] docs/mm/damon/design: add explanation of nr_snapshots
@ 2026-08-31 15:02 SJ Park
2026-08-31 15:02 ` [PATCH v3 1/3] docs/mm/damon/design: accurate semantics " SJ Park
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: SJ Park @ 2026-08-31 15:02 UTC (permalink / raw)
To: Andrew Morton
Cc: SJ Park, Liam R. Howlett, David Hildenbrand, Jonathan Corbet,
Lorenzo Stoakes, Michal Hocko, Mike Rapoport, Randy Dunlap,
Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon, linux-doc,
linux-kernel, linux-mm
Add an explanation of nr_snapshots to avoid misunderstandings.
Changes from v2
- v2: https://lore.kernel.org/20260812104002.15225-1-aethernet65535@gmail.com
- Collect R-b: from SJ.
- Rebase to latest mm-new.
Changes from v1:
- v1: https://lore.kernel.org/damon/20260811101841.804596-1-aethernet65535@gmail.com
- Patch 1 word order adjustment: Repositioned "completely" ("tried to be
completely applied" -> "completely tried to be applied").
- Patch 2: Use two spaces between sentences.
- Patch 3: Add the "Reviewed-by:" of SJ, because he added this in v1.
- Patch 3: Make some minor modifications, Patch 3 can be applied after
Patch 2.
Liew Rui Yan (3):
docs/mm/damon/design: accurate semantics of nr_snapshots
docs/mm/damon/design: difference between watermarks and nr_snapshots
docs/mm/damon/design: fix typo of max_nr_snapshots
Documentation/mm/damon/design.rst | 9 +++++----
include/linux/damon.h | 5 +++--
2 files changed, 8 insertions(+), 6 deletions(-)
base-commit: 5c4fade039dbd572ba5ad9cf993fbb56e6a5613f
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/3] docs/mm/damon/design: accurate semantics of nr_snapshots
2026-08-31 15:02 [PATCH v3 0/3] docs/mm/damon/design: add explanation of nr_snapshots SJ Park
@ 2026-08-31 15:02 ` SJ Park
2026-08-31 18:03 ` sashiko-bot
2026-08-31 15:02 ` [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots SJ Park
2026-08-31 15:02 ` [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots SJ Park
2 siblings, 1 reply; 7+ messages in thread
From: SJ Park @ 2026-08-31 15:02 UTC (permalink / raw)
To: Andrew Morton
Cc: Liew Rui Yan, Liam R. Howlett, David Hildenbrand, Jonathan Corbet,
Lorenzo Stoakes, Michal Hocko, Mike Rapoport, Randy Dunlap,
SJ Park, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon,
linux-doc, linux-kernel, linux-mm
From: Liew Rui Yan <aethernet65535@gmail.com>
Change "tried to be applied" -> "completely tried to be applied" to
maintain consistency between the documentation and the code.
Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/mm/damon/design.rst | 4 ++--
include/linux/damon.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index a8c163475ef2b..af94fc27890b8 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -848,8 +848,8 @@ scheme's execution.
- ``nr_applied``: Total number of regions that the scheme is applied.
- ``sz_applied``: Total size of regions that the scheme is applied.
- ``qt_exceeds``: Total number of times the quota of the scheme has exceeded.
-- ``nr_snapshots``: Total number of DAMON snapshots that the scheme is tried to
- be applied.
+- ``nr_snapshots``: Total number of DAMON snapshots that the scheme is
+ completely tried to be applied.
- ``max_nr_snapshots``: Upper limit of ``nr_snapshots``.
"A scheme is tried to be applied to a region" means DAMOS core logic determined
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 6842a336291e8..d3f45f4dcdafa 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -359,7 +359,8 @@ struct damos_watermarks {
* Total bytes that passed ops layer-handled DAMOS filters.
* @qt_exceeds: Total number of times the quota of the scheme has exceeded.
* @nr_snapshots:
- * Total number of DAMON snapshots that the scheme has tried.
+ * Total number of DAMON snapshots that the scheme is completely
+ * tried to be applied.
*
* "Tried an action to a region" in this context means the DAMOS core logic
* determined the region as eligible to apply the action. The access pattern
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots
2026-08-31 15:02 [PATCH v3 0/3] docs/mm/damon/design: add explanation of nr_snapshots SJ Park
2026-08-31 15:02 ` [PATCH v3 1/3] docs/mm/damon/design: accurate semantics " SJ Park
@ 2026-08-31 15:02 ` SJ Park
2026-08-31 18:05 ` sashiko-bot
2026-08-31 15:02 ` [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots SJ Park
2 siblings, 1 reply; 7+ messages in thread
From: SJ Park @ 2026-08-31 15:02 UTC (permalink / raw)
To: Andrew Morton
Cc: Liew Rui Yan, Liam R. Howlett, David Hildenbrand, Jonathan Corbet,
Lorenzo Stoakes, Michal Hocko, Mike Rapoport, Randy Dunlap,
SJ Park, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon,
linux-doc, linux-kernel, linux-mm
From: Liew Rui Yan <aethernet65535@gmail.com>
Explain the difference between nr_snapshots reaches max_nr_snapshots and
watermarks.
Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/mm/damon/design.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index af94fc27890b8..74170a2285501 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -874,7 +874,8 @@ the action to the region will fail.
Unlike normal stats, ``max_nr_snapshots`` is set by users. If it is set as
non-zero and ``nr_snapshots`` be same to or greater than ``nr_snapshots``, the
-scheme is deactivated.
+scheme is deactivated. Note that, unlike watermarks, even if a scheme's
+``nr_snapshots`` reaches ``max_nr_snapshots``, monitoring will not stop.
To know how user-space can read the stats via :ref:`DAMON sysfs interface
<sysfs_interface>`, refer to :ref:s`stats <sysfs_stats>` part of the
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots
2026-08-31 15:02 [PATCH v3 0/3] docs/mm/damon/design: add explanation of nr_snapshots SJ Park
2026-08-31 15:02 ` [PATCH v3 1/3] docs/mm/damon/design: accurate semantics " SJ Park
2026-08-31 15:02 ` [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots SJ Park
@ 2026-08-31 15:02 ` SJ Park
2026-08-31 18:06 ` sashiko-bot
2 siblings, 1 reply; 7+ messages in thread
From: SJ Park @ 2026-08-31 15:02 UTC (permalink / raw)
To: Andrew Morton
Cc: Liew Rui Yan, Liam R. Howlett, David Hildenbrand, Jonathan Corbet,
Lorenzo Stoakes, Michal Hocko, Mike Rapoport, Randy Dunlap,
SJ Park, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon,
linux-doc, linux-kernel, linux-mm
From: Liew Rui Yan <aethernet65535@gmail.com>
Fixes a typo (nr_snapshots -> max_nr_snapshots) and corrects a grammar
error.
Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/mm/damon/design.rst | 4 ++--
include/linux/damon.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index 74170a2285501..63cbb7b536da2 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -873,8 +873,8 @@ action is ``pageout`` while all pages of the region are unreclaimable, applying
the action to the region will fail.
Unlike normal stats, ``max_nr_snapshots`` is set by users. If it is set as
-non-zero and ``nr_snapshots`` be same to or greater than ``nr_snapshots``, the
-scheme is deactivated. Note that, unlike watermarks, even if a scheme's
+non-zero and ``nr_snapshots`` equals or is greater than ``max_nr_snapshots``,
+the scheme is deactivated. Note that, unlike watermarks, even if a scheme's
``nr_snapshots`` reaches ``max_nr_snapshots``, monitoring will not stop.
To know how user-space can read the stats via :ref:`DAMON sysfs interface
diff --git a/include/linux/damon.h b/include/linux/damon.h
index d3f45f4dcdafa..7b1b6050a8286 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -551,7 +551,7 @@ struct damos_migrate_dests {
*
* After applying the &action to each region, &stat is updated.
*
- * If &max_nr_snapshots is set as non-zero and &stat.nr_snapshots be same to or
+ * If &max_nr_snapshots is set as non-zero and &stat.nr_snapshots equals or is
* greater than it, the scheme is deactivated.
*/
struct damos {
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/3] docs/mm/damon/design: accurate semantics of nr_snapshots
2026-08-31 15:02 ` [PATCH v3 1/3] docs/mm/damon/design: accurate semantics " SJ Park
@ 2026-08-31 18:03 ` sashiko-bot
0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-08-31 18:03 UTC (permalink / raw)
To: SJ Park; +Cc: damon
> From: Liew Rui Yan <aethernet65535@gmail.com>
>
> Change "tried to be applied" -> "completely tried to be applied" to
> maintain consistency between the documentation and the code.
>
> Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
> Reviewed-by: SJ Park <sj@kernel.org>
> Signed-off-by: SJ Park <sj@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831150227.83416-1-sj@kernel.org?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots
2026-08-31 15:02 ` [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots SJ Park
@ 2026-08-31 18:05 ` sashiko-bot
0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-08-31 18:05 UTC (permalink / raw)
To: SJ Park; +Cc: damon
> From: Liew Rui Yan <aethernet65535@gmail.com>
>
> Explain the difference between nr_snapshots reaches max_nr_snapshots and
> watermarks.
>
> Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
> Reviewed-by: SJ Park <sj@kernel.org>
> Signed-off-by: SJ Park <sj@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831150227.83416-1-sj@kernel.org?part=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots
2026-08-31 15:02 ` [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots SJ Park
@ 2026-08-31 18:06 ` sashiko-bot
0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-08-31 18:06 UTC (permalink / raw)
To: SJ Park; +Cc: damon
> From: Liew Rui Yan <aethernet65535@gmail.com>
>
> Fixes a typo (nr_snapshots -> max_nr_snapshots) and corrects a grammar
> error.
>
> Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
> Reviewed-by: SJ Park <sj@kernel.org>
> Signed-off-by: SJ Park <sj@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831150227.83416-1-sj@kernel.org?part=3
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-31 18:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 15:02 [PATCH v3 0/3] docs/mm/damon/design: add explanation of nr_snapshots SJ Park
2026-08-31 15:02 ` [PATCH v3 1/3] docs/mm/damon/design: accurate semantics " SJ Park
2026-08-31 18:03 ` sashiko-bot
2026-08-31 15:02 ` [PATCH v3 2/3] docs/mm/damon/design: difference between watermarks and nr_snapshots SJ Park
2026-08-31 18:05 ` sashiko-bot
2026-08-31 15:02 ` [PATCH v3 3/3] docs/mm/damon/design: fix typo of max_nr_snapshots SJ Park
2026-08-31 18:06 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox