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

damon_merge_regions_of() should be called only after aggregation is
finished and therefore each region's nr_accesses and nr_accesses_bp match.
There were bugs that broke the assumption, during development of online
DAMON parameter updates and monitoring results handling changes.  Add a
sanity check for that under CONFIG_DAMON_DEBUG_SANITY.

Link: https://lkml.kernel.org/r/20260306152914.86303-7-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