[PATCH 1/4] mm/damon/api: define DAMON_FILTER_TYPE_ACTIVE

From: SJ Park

Date: Fri Nov 13 2026 - 01:58:12 EST


Knowing which memory is on Active LRU lists is useful for understanding
and optimally operating systems. Extend the DAMON core layer to be
ready for support of that. For that, define a new damon_filter_type,
DAMON_FILTER_TYPE_ACTIVE. It has no additional arguments and therefore
no additional change in the core layer is needed. Testing if a given
memory is on an LRU list for the type of filter should be implemented in
the operation set layer.

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

diff --git a/include/linux/damon.h b/include/linux/damon.h
index c32ef79c3acea..06bd92981af21 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -780,6 +780,7 @@ struct damon_prep {
* @DAMON_FILTER_TYPE_PGIDLE_UNSET: Pgidle is unset.
* @DAMON_FILTER_TYPE_PGIDLE_SET: Pgidle is set.
* @DAMON_FILTER_TYPE_HUGEPAGE_SIZE: Page is part of a hugepage.
+ * @DAMON_FILTER_TYPE_ACTIVE: LRU-active pages.
*/
enum damon_filter_type {
DAMON_FILTER_TYPE_ANON,
@@ -787,6 +788,7 @@ enum damon_filter_type {
DAMON_FILTER_TYPE_PGIDLE_UNSET,
DAMON_FILTER_TYPE_PGIDLE_SET,
DAMON_FILTER_TYPE_HUGEPAGE_SIZE,
+ DAMON_FILTER_TYPE_ACTIVE,
};

/**
--
2.47.3