All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-damon-core-avoid-destroyed-target-reference-from-damos-quota.patch removed from -mm tree
@ 2025-06-01  5:47 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-06-01  5:47 UTC (permalink / raw)
  To: mm-commits, sj, akinobu.mita, akpm


The quilt patch titled
     Subject: mm/damon/core: avoid destroyed target reference from DAMOS quota
has been removed from the -mm tree.  Its filename was
     mm-damon-core-avoid-destroyed-target-reference-from-damos-quota.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: Akinobu Mita <akinobu.mita@gmail.com>
Subject: mm/damon/core: avoid destroyed target reference from DAMOS quota
Date: Sat, 17 May 2025 23:18:52 +0900

When the number of the monitoring targets in running contexts is reduced,
there may be DAMOS quotas referencing the targets that will be destroyed.

Applying the scheme action for such DAMOS scheme will be skipped forever
looking for the starting part of the region for the destroyed monitoring
target.

To fix this issue, when the monitoring target is destroyed, reset the
starting part for all DAMOS quotas that reference the target.

Link: https://lkml.kernel.org/r/20250517141852.142802-1-akinobu.mita@gmail.com
Fixes: da87878010e5 ("mm/damon/sysfs: support online inputs update")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/damon/core.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/mm/damon/core.c~mm-damon-core-avoid-destroyed-target-reference-from-damos-quota
+++ a/mm/damon/core.c
@@ -1093,9 +1093,17 @@ static int damon_commit_targets(
 			if (err)
 				return err;
 		} else {
+			struct damos *s;
+
 			if (damon_target_has_pid(dst))
 				put_pid(dst_target->pid);
 			damon_destroy_target(dst_target);
+			damon_for_each_scheme(s, dst) {
+				if (s->quota.charge_target_from == dst_target) {
+					s->quota.charge_target_from = NULL;
+					s->quota.charge_addr_from = 0;
+				}
+			}
 		}
 	}
 
_

Patches currently in -mm which might be from akinobu.mita@gmail.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-01  5:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-01  5:47 [merged mm-stable] mm-damon-core-avoid-destroyed-target-reference-from-damos-quota.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.