summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2026-02-27 09:06:21 -0800
committerAndrew Morton <akpm@linux-foundation.org>2026-04-05 13:53:10 -0700
commit1745ccbd2907db2bdaa843e4abccde4fdaccbe5d (patch)
treea99eca40511f4ba339de5afae567dd6a68b21810 /include
parente7e1a26b8ddf0c8df117cc5b211a81ce635a0613 (diff)
downloadlinux-1745ccbd2907db2bdaa843e4abccde4fdaccbe5d.tar.gz
linux-1745ccbd2907db2bdaa843e4abccde4fdaccbe5d.zip
mm/damon/core: do non-safe region walk on kdamond_apply_schemes()
kdamond_apply_schemes() is using damon_for_each_region_safe(), which is safe for deallocation of the region inside the loop. However, the loop internal logic does not deallocate regions. Hence it is only wasting the next pointer. Also, it causes a problem. When an address filter is applied, and there is a region that intersects with the filter, the filter splits the region on the filter boundary. The intention is to let DAMOS apply action to only filtered-in address ranges. However, it is using damon_for_each_region_safe(), which sets the next region before the execution of the iteration. Hence, the region that split and now will be next to the previous region, is simply ignored. As a result, DAMOS applies the action to target regions bit slower than expected, when the address filter is used. Shouldn't be a big problem but definitely better to be fixed. damos_skip_charged_region() was working around the issue using a double pointer hack. Use damon_for_each_region(), which is safe for this use case. And drop the work around in damos_skip_charged_region(). Link: https://lkml.kernel.org/r/20260227170623.95384-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions