]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/damon/core: copy nr_accesses when splitting region
authorSeongJae Park <sj@kernel.org>
Sun, 19 Nov 2023 17:15:28 +0000 (17:15 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:00 +0000 (13:16 -0800)
commitac29673150d410cb551f6d7d0dd030aa0d465058
tree24deb656b2a42b91214959ebcc221be94e3bf3ac
parentd33d57e7429536bec59723be00181ea66f2556e9
mm/damon/core: copy nr_accesses when splitting region

Regions split function ('damon_split_region_at()') is called at the
beginning of an aggregation interval, and when DAMOS applying the actions
and charging quota.  Because 'nr_accesses' fields of all regions are reset
at the beginning of each aggregation interval, and DAMOS was applying the
action at the end of each aggregation interval, there was no need to copy
the 'nr_accesses' field to the split-out region.

However, commit 42f994b71404 ("mm/damon/core: implement scheme-specific
apply interval") made DAMOS applies action on its own timing interval.
Hence, 'nr_accesses' should also copied to split-out regions, but the
commit didn't.  Fix it by copying it.

Link: https://lkml.kernel.org/r/20231119171529.66863-1-sj@kernel.org
Fixes: 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval")
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c