Commit ba95736c authored by SeongJae Park's avatar SeongJae Park Committed by Lee Jones
Browse files

BACKPORT: 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 42f994b7 ("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.

Bug: 254441685
Link: https://lkml.kernel.org/r/20231119171529.66863-1-sj@kernel.org


Fixes: 42f994b7 ("mm/damon/core: implement scheme-specific apply interval")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 1f3730fd)
[Lee: Trivial surrounding diff related conflict]
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I3cea444ee39471b982b337cb4d2854afa311c3ed
parent a44df1cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment