From: Liew Rui Yan <aethernet65535@gmail.com>
To: sj@kernel.org
Cc: damon@lists.linux.dev, linux-mm@kvack.org,
linux-doc@vger.kernel.org,
Liew Rui Yan <aethernet65535@gmail.com>
Subject: [PATCH] Docs/mm/damon: document exclusivity of special-purpose modules
Date: Sat, 14 Mar 2026 17:20:22 +0800 [thread overview]
Message-ID: <20260314092145.7496-1-aethernet65535@gmail.com> (raw)
Add a section in design.rst to explain that DAMON special-purpose kernel
modules (LRU_SORT, RECLAIM, STAT) run in an exclusive manner and return
-EBUSY if another is already running.
Update lru_sort.rst, reclaim.rst and stat.rst by adding cross-references
to this exclusivity rule at the end of their respective Example
sections.
While at it, fix a Sphinx syntax error in the "contents" directive in
design.rst (missing space after :depth:) that prevents the table of
contents from being rendered on docs.kernel.org.
Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
Link: https://lore.kernel.org/damon/20260314002119.79742-1-sj@kernel.org/T/#t
---
Documentation/admin-guide/mm/damon/lru_sort.rst | 5 +++++
Documentation/admin-guide/mm/damon/reclaim.rst | 5 +++++
Documentation/admin-guide/mm/damon/stat.rst | 5 +++++
Documentation/mm/damon/design.rst | 6 +++++-
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/mm/damon/lru_sort.rst b/Documentation/admin-guide/mm/damon/lru_sort.rst
index 06a46812a728..0198dfe87f4d 100644
--- a/Documentation/admin-guide/mm/damon/lru_sort.rst
+++ b/Documentation/admin-guide/mm/damon/lru_sort.rst
@@ -353,3 +353,8 @@ the LRU-list based page granularity reclamation. ::
# echo 400 > wmarks_mid
# echo 200 > wmarks_low
# echo Y > enabled
+
+Note that this module (damon_lru_sort) cannot run simultaneously with other
+DAMON-based special-purpose modules. Refer to :ref:`DAMON design special
+purpose modules exclusivity <damon_design_special_purpose_modules_exclusivity>`
+for more details.
diff --git a/Documentation/admin-guide/mm/damon/reclaim.rst b/Documentation/admin-guide/mm/damon/reclaim.rst
index c5b4d8a1b001..a37ce6fdff05 100644
--- a/Documentation/admin-guide/mm/damon/reclaim.rst
+++ b/Documentation/admin-guide/mm/damon/reclaim.rst
@@ -331,6 +331,11 @@ granularity reclamation. ::
# echo 200 > wmarks_low
# echo Y > enabled
+Note that this module (damon_reclaim) cannot run simultaneously with other
+DAMON-based special-purpose modules. Refer to :ref:`DAMON design special
+purpose modules exclusivity <damon_design_special_purpose_modules_exclusivity>`
+for more details.
+
.. [1] https://research.google/pubs/pub48551/
.. [2] https://lwn.net/Articles/787611/
.. [3] Documentation/mm/free_page_reporting.rst
diff --git a/Documentation/admin-guide/mm/damon/stat.rst b/Documentation/admin-guide/mm/damon/stat.rst
index 468c122c4259..46c5dd96aa2e 100644
--- a/Documentation/admin-guide/mm/damon/stat.rst
+++ b/Documentation/admin-guide/mm/damon/stat.rst
@@ -45,6 +45,11 @@ You can enable DAMON_STAT by setting the value of this parameter as ``Y``.
Setting it as ``N`` disables DAMON_STAT. The default value is set by
``CONFIG_DAMON_STAT_ENABLED_DEFAULT`` build config option.
+Note that this module (damon_stat) cannot run simultaneously with other
+DAMON-based special-purpose modules. Refer to :ref:`DAMON design special
+purpose modules exclusivity <damon_design_special_purpose_modules_exclusivity>`
+for more details.
+
.. _damon_stat_aggr_interval_us:
aggr_interval_us
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index 0a3b77ec458f..3694c541e65a 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -5,7 +5,7 @@ Design
======
.. contents:: :local:
- :depth:2
+ :depth: 2
.. _damon_design_execution_model_and_data_structures:
@@ -960,6 +960,10 @@ more detail, please read the usage documents for those
(:doc:`/admin-guide/mm/damon/stat`, :doc:`/admin-guide/mm/damon/reclaim` and
:doc:`/admin-guide/mm/damon/lru_sort`).
+.. _damon_design_special_purpose_modules_exclusivity:
+
+Note that these modules currently run in an exclusive manner. If one of those
+is already running, others will return ``-EBUSY`` upon start requests.
Sample DAMON Modules
--------------------
--
2.53.0
next reply other threads:[~2026-03-14 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 9:20 Liew Rui Yan [this message]
2026-03-14 16:25 ` [PATCH] Docs/mm/damon: document exclusivity of special-purpose modules SeongJae Park
2026-03-14 20:37 ` Liew Rui Yan
2026-03-15 0:26 ` 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=20260314092145.7496-1-aethernet65535@gmail.com \
--to=aethernet65535@gmail.com \
--cc=damon@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.