summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-07-10 06:46:44 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-08-04 19:18:52 -0700
commit8d5e0ebac9e730d25f1657ffb9f5ae98b57164f6 (patch)
tree9f407ba3f32a79f4d1f1fdfda3363a6a2b84e2a5
parentdb697312bb572aab92601c71497f90c7e5c7fb45 (diff)
downloadlinux-8d5e0ebac9e730d25f1657ffb9f5ae98b57164f6.tar.gz
linux-8d5e0ebac9e730d25f1657ffb9f5ae98b57164f6.zip
mm/damon/core: implement damon_has_probe_weight()
DAMON monitors only data attributes when probe weights are set. However, the function for detecting it is intentionally returning false always. The intention was to make changes for complete support of the mode in a safe and incremental way. Now all the building blocks are made. Complete the mode detection function so that the mode can really start working. Link: https://lore.kernel.org/20260710134651.18084-16-sj@kernel.org Signed-off-by: SJ 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: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/damon/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 91964336ce31..806a67d02a6e 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -211,6 +211,12 @@ static struct damon_probe *damon_nth_probe(int n, struct damon_ctx *ctx)
static bool damon_has_probe_weights(struct damon_ctx *c)
{
+ struct damon_probe *p;
+
+ damon_for_each_probe(p, c) {
+ if (p->weight)
+ return true;
+ }
return false;
}