mm-damon-vaddr-put-pid-in-cleanup_target.patch removed from -mm tree
The quilt patch titled
Subject: mm/damon/vaddr: put pid in cleanup_target()
has been removed from the -mm tree. Its filename was
mm-damon-vaddr-put-pid-in-cleanup_target.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/vaddr: put pid in cleanup_target()
Date: Sat, 12 Jul 2025 12:50:12 -0700
Implement cleanup_target() callback for [f]vaddr, which calls put_pid() for each target that will be destroyed. Also remove redundant put_pid() calls in core, sysfs and sample modules, which were required to be done redundantly due to the lack of such self cleanup in vaddr.
---
mm/damon/core.c | 2 -- mm/damon/sysfs.c | 10 ++-------- mm/damon/vaddr.c | 6 ++++++ samples/damon/prcl.c | 2 -- samples/damon/wsse.c | 2 -- 5 files changed, 8 insertions(+), 14 deletions(-)
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-vaddr-put-pid-in-cleanup_target +0 -2
@@ -1139,8 +1139,6 @@ static int damon_commit_targets( }else {struct damos *s; -if (damon_target_has_pid (dst)) -put_pid (dst_target->pid);damon_destroy_target (dst_target, dst);damon_for_each_scheme (s, dst) {if (s->quota.charge_target_from == dst_target) {
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-vaddr-put-pid-in-cleanup_target +2 -8
@@ -1298,13 +1298,9 @@ static int damon_sysfs_set_attrs(structstatic void damon_sysfs_destroy_targets (struct damon_ctx *ctx) {struct damon_target *t, *next; -bool has_pid =damon_target_has_pid (ctx); -damon_for_each_target_safe (t, next, ctx) { -if (has_pid) -put_pid (t->pid); +damon_for_each_target_safe (t, next, ctx)damon_destroy_target (t, ctx); - } } static int damon_sysfs_set_regions(struct damon_target *t,
@@ -1387,10 +1383,8 @@ static void damon_sysfs_before_terminateif (!damon_target_has_pid (ctx))return ; -damon_for_each_target_safe (t, next, ctx) { -put_pid (t->pid); +damon_for_each_target_safe (t, next, ctx)damon_destroy_target (t, ctx); - } }/*
mm/damon/vaddr.c renamed from mm/damon/vaddr.c~mm-damon-vaddr-put-pid-in-cleanup_target +6 -0
@@ -805,6 +805,11 @@ static bool damon_va_target_valid(structreturn false; } +static void damon_va_cleanup_target (struct damon_target *t) +{ +put_pid (t->pid); +} +#ifndef CONFIG_ADVISE_SYSCALLS static unsigned long damos_madvise (struct damon_target *target,struct damon_region *r,int behavior)
@@ -946,6 +951,7 @@ static int __init damon_va_initcall(void .prepare_access_checks = damon_va_prepare_access_checks, .check_accesses = damon_va_check_accesses, .target_valid = damon_va_target_valid, + .cleanup_target = damon_va_cleanup_target, .cleanup = NULL, .apply_scheme = damon_va_apply_scheme, .get_scheme_score = damon_va_scheme_score,
samples/damon/prcl.c renamed from samples/damon/prcl.c~mm-damon-vaddr-put-pid-in-cleanup_target +0 -2
@@ -120,8 +120,6 @@ static void damon_sample_prcl_stop(void)damon_stop (&ctx,1 );damon_destroy_ctx (ctx); } -if (target_pidp) -put_pid (target_pidp); }static bool init_called;
samples/damon/wsse.c renamed from samples/damon/wsse.c~mm-damon-vaddr-put-pid-in-cleanup_target +0 -2
@@ -100,8 +100,6 @@ static void damon_sample_wsse_stop(void)damon_stop (&ctx,1 );damon_destroy_ctx (ctx); } -if (target_pidp) -put_pid (target_pidp); }static bool init_called;
_
Patches currently in -mm which might be from [email protected] are
mm-damon-core-commit-damos_quota_goal-nid.patch mm-damon-sysfs-implement-refresh_ms-file-under-kdamond-directory.patch mm-damon-sysfs-implement-refresh_ms-file-internal-work.patch docs-admin-guide-mm-damon-usage-document-refresh_ms-file.patch docs-abi-damon-update-for-refresh_ms.patch