]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/damon/core: do damos walking in entire regions granularity
authorSeongJae Park <sj@kernel.org>
Mon, 10 Feb 2025 18:27:36 +0000 (10:27 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:06:10 +0000 (22:06 -0700)
commit6fa70372c86162608c522eeaa58201d6c11ab773
treee93662eab892acfb69e0217d0a0e8397a494ab2b
parent40eb655b410d5c842313e556f743888033687865
mm/damon/core: do damos walking in entire regions granularity

damos_walk_control can be installed while DAMOS is walking the regions.
This means the walk callback function invocations can be started from a
region at the middle of the regions list.  This makes it hard to be used
reliably.  Particularly, DAMOS tried regions update for collecting
monitoring results gets problematic results.  Increase the
walk_control_lock critical section to do walking in entire regions
granularity.

Link: https://lkml.kernel.org/r/20250210182737.134994-4-sj@kernel.org
Fixes: bf0eaba0ff9c ("mm/damon/core: implement damos_walk()")
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c