]> 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>
Fri, 28 Feb 2025 00:59:55 +0000 (16:59 -0800)
commit5bde9b0f7511f00c93d1738d0fd6691a37eec829
treef4d2753318900d55a520c2bc86ae733865592a55
parent1d2368674549449bfa4bf8eb612d36c97fa9eddf
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