Skip to contentSkip to conversation

docs-mm-damon-document-min_nr_regions-constraint-and-rationale.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 29

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: Docs/mm/damon: document min_nr_regions constraint and rationale
has been removed from the -mm tree. Its filename was
docs-mm-damon-document-min_nr_regions-constraint-and-rationale.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Liew Rui Yan <[email protected]>
Subject: Docs/mm/damon: document min_nr_regions constraint and rationale
Date: Fri, 20 Mar 2026 13:24:28 +0800

The current DAMON implementation requires 'min_nr_regions' to be at least
3. However, this constraint is not explicitly documented in the admin-guide documents, nor is its design rationale explained in the design document.

Add a section in design.rst to explain the rationale: the virtual address space monitoring design needs to handle at least three regions to accommodate two large unmapped areas. While this is specific to 'vaddr', DAMON currently enforces it across all operation sets for consistency.

Also update reclaim.rst and lru_sort.rst by adding cross-references to this constraint within their respective 'min_nr_regions' parameter description sections, ensuring users are aware of the lower bound.

This change is motivated from a recent discussion [1].

---

 Documentation/admin-guide/mm/damon/lru_sort.rst |    4 ++++
 Documentation/admin-guide/mm/damon/reclaim.rst  |    4 ++++
 Documentation/mm/damon/design.rst               |    7 +++++++
 3 files changed, 15 insertions(+)
Documentation/admin-guide/mm/damon/lru_sort.rst renamed from Documentation/admin-guide/mm/damon/lru_sort.rst~docs-mm-damon-document-min_nr_regions-constraint-and-rationale +4 -0
@@ -221,6 +221,10 @@ But, setting this too high could result
 Please refer to the DAMON documentation (:doc:`usage`) for more detail.  10 by
 default.
 
+Note that this must be 3 or higher. Please refer to the :ref:`Monitoring
+<damon_design_monitoring>` section of the design document for the rationale
+behind this lower bound.
+
 max_nr_regions
 --------------
 
Documentation/admin-guide/mm/damon/reclaim.rst renamed from Documentation/admin-guide/mm/damon/reclaim.rst~docs-mm-damon-document-min_nr_regions-constraint-and-rationale +4 -0
@@ -204,6 +204,10 @@ monitoring.  This can be used to set low
 But, setting this too high could result in increased monitoring overhead.
 Please refer to the DAMON documentation (:doc:`usage`) for more detail.
 
+Note that this must be 3 or higher. Please refer to the :ref:`Monitoring
+<damon_design_monitoring>` section of the design document for the rationale
+behind this lower bound.
+
 max_nr_regions
 --------------
 
Documentation/mm/damon/design.rst renamed from Documentation/mm/damon/design.rst~docs-mm-damon-document-min_nr_regions-constraint-and-rationale +7 -0
@@ -167,6 +167,13 @@ monitoring attributes, ``sampling interv
 ``update interval``, ``minimum number of regions``, and ``maximum number of
 regions``.
 
+Note that ``minimum number of regions`` must be 3 or higher. This is because the
+virtual address space monitoring is designed to handle at least three regions to
+accommodate two large unmapped areas commonly found in normal virtual address
+spaces. While this restriction might not be strictly necessary for other
+operation sets like ``paddr``, it is currently enforced across all DAMON
+operations for consistency.
+
 To know how user-space can set the attributes via :ref:`DAMON sysfs interface
 <sysfs_interface>`, refer to :ref:`monitoring_attrs <sysfs_monitoring_attrs>`
 part of the documentation.

_

Patches currently in -mm which might be from [email protected] are