aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
authorSeongJae Park <sj@kernel.org>2026-05-18 16:41:10 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:31:15 -0700
commit7074b17d1788e78aada960154c87e0275adc5b69 (patch)
tree59e8c6faa85db4ee9164d12d54685d0d506f16f7 /include
parent3e2bad9aa182e8ccd8a2c47033242f5a28460459 (diff)
downloadlinux-next-history-7074b17d1788e78aada960154c87e0275adc5b69.tar.gz
mm/damon/core: introduce DAMON_FILTER_TYPE_MEMCG
Belonging memory cgoup is another data attribute that can be useful to monitor. Introduce a new DAMON filter type, namely DAMON_FILTER_TYPE_MEMCG, for monitoring of this attribute. Link: https://lore.kernel.org/20260518234119.97569-23-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: David Hildenbrand <david@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/damon.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 1fb271a35e98f..6a54c601889bd 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -742,9 +742,11 @@ struct damon_intervals_goal {
* enum damon_filter_type - Type of &struct damon_filter
*
* @DAMON_FILTER_TYPE_ANON: Anonymous pages.
+ * @DAMON_FILTER_TYPE_MEMCG: Specific memcg's pages.
*/
enum damon_filter_type {
DAMON_FILTER_TYPE_ANON,
+ DAMON_FILTER_TYPE_MEMCG,
};
/**
@@ -753,12 +755,16 @@ enum damon_filter_type {
* @type: Type of the region.
* @matching: Whether this filter is for the type-matching ones.
* @allow: Whether the @type-@matching ones should pass this filter.
+ * @memcg_id: Memcg id of the question if @type is DAMON_FILTER_MEMCG.
* @list: Siblings list.
*/
struct damon_filter {
enum damon_filter_type type;
bool matching;
bool allow;
+ union {
+ u64 memcg_id;
+ };
struct list_head list;
};