Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CD523BFE2B for ; Wed, 5 Aug 2026 02:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785896707; cv=none; b=tQFWgCNcTuYyGtnr+ictckATy8PH2p5wjlvnTZpgzTb+pNsofUOiwMVqDwRLEPhpNJAZk4nOTcvtmdpsO7g9kfyPYQiVoxq7oJ92NrAFZy/OLV9VbfLVNpJXFtBBROyxvvRFZmw9PVsjS0CI7rfGeJG/0tdLUlwkOsk2HUnrDyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785896707; c=relaxed/simple; bh=hoOdtqcEpupKBjSbS4xjwuVjtBzApRuRj8vhagYJB3E=; h=Date:To:From:Subject:Message-Id; b=WRDEGnrX+rXyInZhljCRng+NeiIIjnALFrKidNYPiRqfoBCkhgIkMUbjfq2g3OB0F9GF9IoejqJWup+KQaHyqqpp5aayvbaOXnodyOP7t2w178pdqsWJ/Yemm8Cxh2XBC2B6Em59bpF89cc67oAOk9ec/rdBzvAb2wHTwGe34DQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=QuRUDnAk; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="QuRUDnAk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2468D1F00A3A; Wed, 5 Aug 2026 02:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1785896706; bh=/SISFL4mRbE1v5SzaNdo22QH10Hv/IWn2KXYK9AZU+4=; h=Date:To:From:Subject; b=QuRUDnAkbk71CSStsmSOnMvf/yODPTuJCbXcJh9M3aQFIq0PnFxZCvlC+CmbuiZcp aqRONxXv3hw5v2is8UTX+zcGuvJEXGUvYLcJJoOp4piu2CGV2kwO6hmPuAoZliXtLb yjRQmzeI/d4dYuq/bC6UxJ7s0B4wghftaFxFPD2s= Date: Tue, 04 Aug 2026 19:25:05 -0700 To: mm-commits@vger.kernel.org,vbabka@kernel.org,surenb@google.com,rppt@kernel.org,mhocko@suse.com,ljs@kernel.org,liam@infradead.org,david@kernel.org,corbet@lwn.net,sj@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum.patch removed from -mm tree Message-Id: <20260805022506.2468D1F00A3A@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: mm/damon/core: ask apply_probe() to return max probe hits weighted sum has been removed from the -mm tree. Its filename was mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum.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: SJ Park Subject: mm/damon/core: ask apply_probe() to return max probe hits weighted sum Date: Fri, 10 Jul 2026 06:46:33 -0700 check_accesses() DAMON ops callback returns the maximum nr_accesses of regions. DAMON core uses it to calculate a reasonable region merge threshold. The core will need to adjust regions for not nr_accesses but probe hits weighted sum in future. For that, the core needs to know the maximum weighted sum of the regions. Update the protocol for the task. Link: https://lore.kernel.org/20260710134651.18084-5-sj@kernel.org Signed-off-by: SJ Park Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- include/linux/damon.h | 5 ++++- mm/damon/core.c | 2 +- mm/damon/paddr.c | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) --- a/include/linux/damon.h~mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum +++ a/include/linux/damon.h @@ -649,6 +649,8 @@ enum damon_ops_id { * @apply_probes should apply the data attribute probes to each region and * accordingly update the probe hits counter of the region. It should also * set &damon_region->sampling_addr of each region if ``set_samples`` is true. + * It should also return maximum probe hits weighted sum of regions if + * ``return_max_wsum`` is true. * @get_scheme_score should return the priority score of a region for a scheme * as an integer in [0, &DAMOS_MAX_SCORE]. * @apply_scheme is called from @kdamond when a region for user provided @@ -666,7 +668,8 @@ struct damon_operations { void (*update)(struct damon_ctx *context); void (*prepare_access_checks)(struct damon_ctx *context); unsigned int (*check_accesses)(struct damon_ctx *context); - void (*apply_probes)(struct damon_ctx *context, bool set_samples); + unsigned int (*apply_probes)(struct damon_ctx *context, + bool set_samples, bool return_max_wsum); int (*get_scheme_score)(struct damon_ctx *context, struct damon_region *r, struct damos *scheme); unsigned long (*apply_scheme)(struct damon_ctx *context, --- a/mm/damon/core.c~mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum +++ a/mm/damon/core.c @@ -3692,7 +3692,7 @@ static int kdamond_fn(void *data) if (ctx->ops.check_accesses) max_nr_accesses = ctx->ops.check_accesses(ctx); if (ctx->ops.apply_probes) - ctx->ops.apply_probes(ctx, false); + ctx->ops.apply_probes(ctx, false, false); if (time_after_eq(ctx->passed_sample_intervals, next_aggregation_sis)) { --- a/mm/damon/paddr.c~mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum +++ a/mm/damon/paddr.c @@ -166,7 +166,8 @@ static bool damon_pa_filter_pass(phys_ad return pass; } -static void damon_pa_apply_probes(struct damon_ctx *ctx, bool set_samples) +static unsigned int damon_pa_apply_probes(struct damon_ctx *ctx, + bool set_samples, bool return_max_wsum) { struct damon_target *t; struct damon_region *r; @@ -194,6 +195,7 @@ static void damon_pa_apply_probes(struct folio_put(folio); } } + return 0; } /* _ Patches currently in -mm which might be from sj@kernel.org are mm-damon-adjust-isolated-pages-stat-for-damos_migrate_hotcold.patch samples-damon-mtier-error-out-for-zero-quota-goal-target-values.patch mm-damon-lru_sort-error-out-for-10000-active_mem_bp.patch mm-damon-reclaim-skip-damon_call-if-ctx-has-not-started.patch mm-damon-lru_sort-skip-damon_call-if-ctx-has-not-started.patch mm-damon-core-skip-aging-from-repeated-aggressive-merging.patch mm-damon-core-hide-private-damon_region-fields.patch mm-damon-core-hide-private-damon_target-fields.patch mm-damon-core-hide-private-damos_quota_goal-fields.patch mm-damon-core-hide-private-damos_quota-fields.patch mm-damon-core-hide-private-damos_filter-fields.patch mm-damon-core-hide-private-damos-fields.patch mm-damon-core-hide-private-damon_filter-fields.patch mm-damon-core-hide-private-damon_probe-fields.patch mm-damon-sysfs-do-not-directly-access-damon_ctx-ops.patch mm-damon-core-hide-core-private-damon_ctx-fields.patch mm-damon-core-avoid-infinite-kdamond_merge_regions-internal-loop.patch mm-damon-tests-core-kunit-catch-test-failure-in-test_merge_regions_of.patch mm-damon-vaddr-drop-last-same-folio-access-check-optimization.patch mm-damon-paddr-drop-last-same-folio-access-check-reuse-optimization.patch mm-damon-sysfs-read-addr_unit-only-once-in-damon_sysfs_apply_inputs.patch mm-damon-sysfs-read-ops_id-only-once-in-damon_sysfs_apply_inputs.patch mm-damon-core-initialize-damos-last_applied.patch mm-damon-core-kunit-check-region-count-before-testing-in-split_at.patch mm-damon-vaddr-kunit-check-region-count-in-three_regions-test.patch mm-damon-core-kunit-handle-region-split-failure-in-filter_out.patch mm-damon-core-kunit-skip-wrong-dest-walk-in-commit_dests_for.patch mm-damon-core-kunit-skip-wrong-quota-goal-walk-in-commit_quota_goals.patch mm-damon-core-kunit-skip-wrong-region-walk-in-commit_target_regions.patch mm-damon-ops-common-use-nr_accesses-moving-sum-for-quota-score.patch mm-damon-core-handle-region-split-failure-in-apply_min_nr_regions.patch