Skip to contentSkip to conversation

mm-damon-core-replace-per-quota-regions-priority-histogram-buffer-usage-with-per-context-one.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 9, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon/core: replace per-quota regions priority histogram buffer usage with per-context one
has been removed from the -mm tree. Its filename was
mm-damon-core-replace-per-quota-regions-priority-histogram-buffer-usage-with-per-context-one.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: replace per-quota regions priority histogram buffer usage with per-context one
Date: Sun, 25 Aug 2024 21:23:21 -0700

Replace the usage of per-quota region priorities histogram buffer with the per-context one. After this change, the per-quota histogram is not used by anyone, and hence it is ready to be removed.

---

 mm/damon/core.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-replace-per-quota-regions-priority-histogram-buffer-usage-with-per-context-one +6 -3
@@ -1582,13 +1582,16 @@ static void damos_adjust_quota(struct da
 		return;
 
 	/* Fill up the score histogram */
-	memset(quota->histogram, 0, sizeof(quota->histogram));
+	memset(c->regions_score_histogram, 0,
+			sizeof(*c->regions_score_histogram) *
+			(DAMOS_MAX_SCORE + 1));
 	damon_for_each_target(t, c) {
 		damon_for_each_region(r, t) {
 			if (!__damos_valid_target(r, s))
 				continue;
 			score = c->ops.get_scheme_score(c, t, r, s);
-			quota->histogram[score] += damon_sz_region(r);
+			c->regions_score_histogram[score] +=
+				damon_sz_region(r);
 			if (score > max_score)
 				max_score = score;
 		}
@@ -1596,7 +1599,7 @@ static void damos_adjust_quota(struct da
 
 	/* Set the min score limit */
 	for (cumulated_sz = 0, score = max_score; ; score--) {
-		cumulated_sz += quota->histogram[score];
+		cumulated_sz += c->regions_score_histogram[score];
 		if (cumulated_sz >= quota->esz || !score)
 			break;
 	}

_

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