[PATCH 4/7] mm/damon: document non-zero length damon_region assumption

SeongJae Park posted 7 patches 1 month ago
[PATCH 4/7] mm/damon: document non-zero length damon_region assumption
Posted by SeongJae Park 1 month ago
DAMON regions are assumed to always be non-zero length.  There was a
confusion [1] about it, probably due to lack of the documentation.
Document it.

[1] https://lore.kernel.org/20251231070029.79682-1-sj@kernel.org/

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 include/linux/damon.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 9a88cf8d152d8..6bd71546f7b20 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -55,6 +55,8 @@ struct damon_size_range {
  * @list:		List head for siblings.
  * @age:		Age of this region.
  *
+ * For any use case, @ar should be non-zero positive size.
+ *
  * @nr_accesses is reset to zero for every &damon_attrs->aggr_interval and be
  * increased for every &damon_attrs->sample_interval if an access to the region
  * during the last sampling interval is found.  The update of this field should
-- 
2.47.3