summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-06-29 21:07:59 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-07-02 23:27:34 -0700
commit2f9ec2acae68f6fa5df937291a6fa8ac32906254 (patch)
treed85422911c1980a0d0f0259296c91d5ab5c1cffd /include
parentd4728a7b0b1d633de5e7a496d6a5a31904633f7a (diff)
downloadlinux-next-2f9ec2acae68f6fa5df937291a6fa8ac32906254.tar.gz
linux-next-2f9ec2acae68f6fa5df937291a6fa8ac32906254.zip
mm/damon/core: use damon_nr_accesses_mvsum() for damos region tracing
damon_nr_accesses_mvsum() returns a value same to nr_accesses_bp. Also the function is more simple and therefore more tolerant to errors. Execution of the function would be more expensive than the simple read of the field, but because the function is quite simple, the overhead should be negligible. Use it in the DAMON region exporting trace points instead of the nr_accesses_bp. Link: https://lore.kernel.org/20260630040812.149729-7-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/damon.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h
index 78388538acf4..8851727ae162 100644
--- a/include/trace/events/damon.h
+++ b/include/trace/events/damon.h
@@ -78,9 +78,11 @@ TRACE_EVENT_CONDITION(damos_before_apply,
TP_PROTO(unsigned int context_idx, unsigned int scheme_idx,
unsigned int target_idx, struct damon_region *r,
- unsigned int nr_regions, bool do_trace),
+ unsigned int nr_accesses, unsigned int nr_regions,
+ bool do_trace),
- TP_ARGS(context_idx, scheme_idx, target_idx, r, nr_regions, do_trace),
+ TP_ARGS(context_idx, scheme_idx, target_idx, r, nr_accesses,
+ nr_regions, do_trace),
TP_CONDITION(do_trace),
@@ -101,7 +103,7 @@ TRACE_EVENT_CONDITION(damos_before_apply,
__entry->target_idx = target_idx;
__entry->start = r->ar.start;
__entry->end = r->ar.end;
- __entry->nr_accesses = r->nr_accesses_bp / 10000;
+ __entry->nr_accesses = nr_accesses;
__entry->age = r->age;
__entry->nr_regions = nr_regions;
),