]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/damon/core: add damon_reset_aggregated() debug_sanity check
authorSeongJae Park <sj@kernel.org>
Fri, 6 Mar 2026 15:29:11 +0000 (07:29 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:21 +0000 (13:53 -0700)
commitc556187b6e247b5d817b4392fe2ba6d299515795
tree3fa4205dde30d396faa95e953d083ac6be6bd9dd
parent6aa1f783547896df3db1cf3dc5198f03df5ce775
mm/damon/core: add damon_reset_aggregated() debug_sanity check

At time of damon_reset_aggregated(), aggregation of the interval should be
completed, and hence nr_accesses and nr_accesses_bp should match.  I found
a few bugs caused it to be broken in the past, from online parameters
update and complicated nr_accesses handling changes.  Add a sanity check
for that under CONFIG_DAMON_DEBUG_SANITY.

Link: https://lkml.kernel.org/r/20260306152914.86303-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c