Skip to contentSkip to conversation

mm-damon-core-reset-age-if-nr_accesses-changes-between-non-zero-and-zero.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/core: reset age if nr_accesses changes between non-zero and zero
has been removed from the -mm tree. Its filename was
mm-damon-core-reset-age-if-nr_accesses-changes-between-non-zero-and-zero.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/damon/core: reset age if nr_accesses changes between non-zero and zero
Date: Mon, 15 Sep 2025 20:23:35 -0700

Patch series "mm/damon: misc fixups and improvements for 6.18", v2.

Misc fixes and improvements for DAMON that are not critical and therefore aims to be merged into Linux 6.18-rc1.

The first patch improves DAMON's age counting for nr_accesses zero to/from non-zero changes.

The second patch fixes an initial DAMOS apply interval delay issue that is not realistic but still could happen on an odd setup.

The third and the fourth patches update DAMON community meetup description and DAMON user-space tool example command for DAMOS usage, respectively.

Finally, the fifth patch updates MAINTAINERS section name for DAMON to just DAMON.

This patch (of 5):

DAMON resets the age of a region if its nr_accesses value has significantly changed. Specifically, the threshold is calculated as 20% of largest nr_accesses of the current snapshot. This means that regions changing the nr_accesses from zero to small non-zero value or from a small non-zero value to zero will keep the age. Since many users treat zero nr_accesses regions special, this can be confusing. Kernel code including DAMOS' regions priority calculation and DAMON_STAT's idle time calculation also treat zero nr_accesses regions special. Make it unconfusing by resetting the age when the nr_accesses changes between zero and a non-zero value.

---

 mm/damon/core.c |    2 ++
 1 file changed, 2 insertions(+)
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-reset-age-if-nr_accesses-changes-between-non-zero-and-zero +2 -0
@@ -2261,6 +2261,8 @@ static void damon_merge_regions_of(struc
 	damon_for_each_region_safe(r, next, t) {
 		if (abs(r->nr_accesses - r->last_nr_accesses) > thres)
 			r->age = 0;
+		else if ((r->nr_accesses == 0) != (r->last_nr_accesses == 0))
+			r->age = 0;
 		else
 			r->age++;
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-sysfs-set-damon_ctx-min_sz_region-only-for-paddr-use-case.patch