From mboxrd@z Thu Jan 1 00:00:00 1970 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 56719328635 for ; Fri, 31 Jul 2026 02:43:13 +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=1785465794; cv=none; b=DXPbjc51GJH1gG7QYxf1PqQ7XhYczMGRF4/4y2x60ttNI9uG4fI/A4SzSOm+MWO53DdB9g80SZTohHa8YKUYd+Ntg0v8TnCkRRQIAE9LgfvelHBBHf9pz8NKP6buvrjl5saguFVt0vc8BhE0Pbt2gps4bK6h57vN5S0i+3qFQwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785465794; c=relaxed/simple; bh=Z59Mctmb8adO1WioZGZ2Bex6baYUUDfTXL8tiIm+yxE=; h=Date:To:From:Subject:Message-Id; b=mJ+Mrux72jcXANLye2r0/+f7MGnjsPlzZX8TuH4k/V+Av856n8keVvM7UJigpAIrghMUoFqIpe5bjuVsOsiqKdXVz1KQl7/mPm9hxcpx3dXq5mdtMrKitm22isMDvJe45hc4aCU51uqmwvRHd2EInZp/vUponJdLe/mH0Sc1e54= 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=LuQQhieH; 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="LuQQhieH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A1371F000E9; Fri, 31 Jul 2026 02:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1785465793; bh=cux4C6B4FSrEKXsvcq0TRkkQLpATGbq0wheHoK1c4Xc=; h=Date:To:From:Subject; b=LuQQhieHkPCQ0klTXWiZYnPkMn0xqfyBtAIXjhHSxjR4DZKzDVGA+oEURU7yk1LkI 674H+qBEIl33i5/soe1xTra0nLYxPA8Cr8IXL09Ux74vj8ucdHZAewcMX20JnvnaNP pMYqJfThBMIR+czMwaudXCPmjGW/I1EZ5FkAVRjs= Date: Thu, 30 Jul 2026 19:43:12 -0700 To: mm-commits@vger.kernel.org,sj@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-damon-core-introduce-damon_probe_hits_mvsum.patch removed from -mm tree Message-Id: <20260731024313.2A1371F000E9@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: introduce damon_probe_hits_mvsum() has been removed from the -mm tree. Its filename was mm-damon-core-introduce-damon_probe_hits_mvsum.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: introduce damon_probe_hits_mvsum() Date: Fri, 3 Jul 2026 10:06:02 -0700 Implement a function for getting a reasonable best effort quality pseudo moving sums of probe_hits on demands. It reuses the internal function for the pseudo moving sum for data access frequency (nr_accesses). Link: https://lore.kernel.org/20260703170605.94472-3-sj@kernel.org Signed-off-by: SJ Park Signed-off-by: Andrew Morton --- include/linux/damon.h | 2 ++ mm/damon/core.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) --- a/include/linux/damon.h~mm-damon-core-introduce-damon_probe_hits_mvsum +++ a/include/linux/damon.h @@ -1003,6 +1003,8 @@ void damon_add_probe(struct damon_ctx *c struct damon_region *damon_new_region(unsigned long start, unsigned long end); unsigned int damon_nr_accesses_mvsum(struct damon_region *r, struct damon_ctx *ctx); +unsigned char damon_probe_hits_mvsum(int probe_idx, struct damon_region *r, + struct damon_ctx *ctx); int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges, unsigned int nr_ranges, unsigned long min_region_sz); --- a/mm/damon/core.c~mm-damon-core-introduce-damon_probe_hits_mvsum +++ a/mm/damon/core.c @@ -273,6 +273,27 @@ unsigned int damon_nr_accesses_mvsum(str left_window_bp); } +unsigned char damon_probe_hits_mvsum(int probe_idx, struct damon_region *r, + struct damon_ctx *ctx) +{ + unsigned long sample_interval, aggr_interval; + unsigned long window_len, left_window, left_window_bp; + + sample_interval = ctx->attrs.sample_interval ? : 1; + aggr_interval = ctx->attrs.aggr_interval ? : 1; + window_len = aggr_interval / sample_interval; + if (time_after_eq(ctx->passed_sample_intervals, + ctx->next_aggregation_sis)) + left_window = 0; + else + left_window = ctx->next_aggregation_sis - + ctx->passed_sample_intervals; + left_window_bp = mult_frac(left_window, 10000, window_len); + + return damon_mvsum(r->probe_hits[probe_idx], + r->last_probe_hits[probe_idx], left_window_bp); +} + #ifdef CONFIG_DAMON_DEBUG_SANITY static void damon_verify_new_region(unsigned long start, unsigned long end) { _ Patches currently in -mm which might be from sj@kernel.org are mm-damon-adjust-isolated-pages-stat-for-damos_migrate_hotcold.patch mm-damon-core-stop-ctxs-in-damon_start-before-returning-an-error.patch samples-damon-mtier-do-not-stop-first-context-for-damon_start-failure.patch mm-damon-core-make-damon_stop-never-fails.patch mm-damon-sysfs-ignore-damon_stop-return-value.patch mm-damon-reclaaim-ignore-damon_stop-return-value.patch mm-damon-lru_sort-ignore-damon_stop-return-value.patch mm-damon-core-change-damon_stop-return-type-to-void.patch samples-damon-mtier-stop-all-contexts-with-single-damon_stop-call.patch mm-damon-core-wait-ctx-stop-in-damon_call-before-reruning-an-error.patch samples-damon-wsse-do-not-stop-ctx-for-damon_call-failure.patch samples-damon-prcl-do-not-stop-damon-for-damon_call-failure.patch mm-damon-core-remove-comment-and-test-for-nr_to_bp-divide-by-zero.patch mm-damon-core-s-damon_max_nr_accesses-damon_nr_samples_per_aggr.patch mm-damon-core-s-accesses_bp_to_nr_accesses-sample_bp_to_count.patch mm-damon-core-s-nr_accesses_to_accesses_bp-sample_count_to_bp.patch mm-damon-core-s-nr_accesses_for_new_attrs-nr_samples_for_new_attrs.patch mm-damon-core-update-probe-hits-for-new-parameter-commit.patch mm-damon-core-handle-unreset-probe_hits-in-probe_hits_mvsum.patch mm-damon-core-introduce-damon_probe-weight.patch mm-damon-core-ask-apply_probes-ops-callback-to-set-sampling-address.patch mm-damon-paddr-set-samples-in-apply_probes-if-requested.patch mm-damon-core-ask-apply_probe-to-return-max-probe-hits-weighted-sum.patch mm-damon-core-implement-damon_probe_hits_wsum.patch mm-damon-paddr-respect-return_max_wsum.patch mm-damon-core-use-abs_diff-instead-of-abs.patch mm-damon-core-extend-merge-function-to-work-with-probe-hits.patch mm-damon-core-disallow-probe_hits-overflow-on-attrs-only-monitoring.patch mm-damon-core-validate-params-for-probe-hits-weighted-sum-overflow.patch mm-damon-core-disable-access-monitoring-when-probe-weights-are-set.patch mm-damon-core-set-samples-in-apply_probes-if-probe-weights-are-set.patch mm-damon-core-s-max_nr_accesses-max_merge_score-in-kdamond_fn.patch mm-damon-core-get-merge-threshold-from-probe-hits-when-weights-are-set.patch mm-damon-core-implement-damon_has_probe_weight.patch mm-damon-sysfs-implement-probe-weight-file.patch docs-mm-damon-design-document-attrs-only-monitoring.patch docs-admin-guide-mm-damon-usage-document-weight-sysfs-file.patch docs-abi-damon-document-probe-weight-file.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