mm/damon/core: copy nr_accesses when splitting region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: SeongJae Park <sj@xxxxxxxxxx>

commit 1f3730fd9e8d4d77fb99c60d0e6ad4b1104e7e04 upstream.

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@xxxxxxxxxx
Fixes: 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval")
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 mm/damon/core.c |    1 +
 1 file changed, 1 insertion(+)

--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1215,6 +1215,7 @@ static void damon_split_region_at(struct
 
 	new->age = r->age;
 	new->last_nr_accesses = r->last_nr_accesses;
+	new->nr_accesses = r->nr_accesses;
 
 	damon_insert_region(new, r, damon_next_region(r), t);
 }


Patches currently in stable-queue which might be from sj@xxxxxxxxxx are

queue-6.6/mm-damon-core-copy-nr_accesses-when-splitting-region.patch
queue-6.6/mm-damon-core-implement-scheme-specific-apply-interv.patch
queue-6.6/tools-mm-fix-compile-error.patch
queue-6.6/mm-damon-core-handle-zero-aggregation-ops_update-int.patch
queue-6.6/mm-damon-core-check-apply-interval-in-damon_do_apply_schemes.patch
queue-6.6/mm-damon-core-handle-zero-schemes-apply-interval.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux