]> 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>
Tue, 4 Mar 2025 05:49:46 +0000 (21:49 -0800)
commit34757bd64cef30f0ff7cdd96e907c9724eb563a9
treea047f367d31f28f89c5c0f581faea1edd79fb5da
parent672b1c3ebc8fac5f634360d2d8168058b18f6381
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