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 BA924339365 for ; Fri, 31 Jul 2026 02:42:51 +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=1785465773; cv=none; b=uN8YNJjOpBHH2u56wHPp11dmmWJ7MfhyEcWEf7Zy7Frp5e2/mu2bEuH3tTKd5VaD/BhkDZ0oRPyiPQ19iXCjlXZ4YcpQc5rB8nDSrhdW4Qyyg3Ky5whszoH6pt+e3xyuJEr8bWkgVrvG21ENNxY3hthM2ZFu04D9bVu6BlaGupc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785465773; c=relaxed/simple; bh=58ydSBEH7ynHK6XCfQErgVGRuTgx1ng0y4E0EWIRISc=; h=Date:To:From:Subject:Message-Id; b=cXBxys2AR/Ck8F+UUXl5dobzPSmYZisu3oGOB/TzYX0/Et0Zqs7a12JRxz5JgLgSROv9W+YKOK8oP6UbhYOuOCrBZIRESd1Y108JeedgAyNhib4EESlBTaGGhiILbvZtQHXmOAUyWlE73hoSGa1Xxg3YZRPI0mIOvIn3rmQvaAM= 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=OnaCcBRN; 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="OnaCcBRN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 924EA1F00A3A; Fri, 31 Jul 2026 02:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1785465771; bh=/2YzBWEfSLZ1VzlIL4DHc4Us5LI3kmfhPFvwF6eFdfQ=; h=Date:To:From:Subject; b=OnaCcBRN4T3aaH+06IgZCvqKejJkXUCjb4bEIONfAHRHOWlONFnzDiL5Z9qBcvepZ UxLW7Gcfwz4y01w8dS9FjipM84oadXpscm3hpkTEgeVtQqkyiv9iMChjGd0Mb/B3RC w2V6IjfMj37R3sfTZR3jRQXCbtEsADpqk0acvPcs= Date: Thu, 30 Jul 2026 19:42:51 -0700 To: mm-commits@vger.kernel.org,shuah@kernel.org,rostedt@goodmis.org,mhiramat@kernel.org,mathieu.desnoyers@efficios.com,brendan.higgins@linux.dev,sj@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-damon-core-remove-nr_accesses_bp-setups-and-updates.patch removed from -mm tree Message-Id: <20260731024251.924EA1F00A3A@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: remove nr_accesses_bp setups and updates has been removed from the -mm tree. Its filename was mm-damon-core-remove-nr_accesses_bp-setups-and-updates.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: remove nr_accesses_bp setups and updates Date: Mon, 29 Jun 2026 21:08:06 -0700 DAMON core sets and updates nr_accesses_bp in multiple places. It explains how delicate it is. The field is no more being used for any real purpose, and replaced by a simpler function. Remove the setups and updates. Link: https://lore.kernel.org/20260630040812.149729-14-sj@kernel.org Signed-off-by: SJ Park Cc: Brendan Higgins Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Shuah Khan Cc: Steven Rostedt Signed-off-by: Andrew Morton --- mm/damon/core.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) --- a/mm/damon/core.c~mm-damon-core-remove-nr_accesses_bp-setups-and-updates +++ a/mm/damon/core.c @@ -302,7 +302,6 @@ struct damon_region *damon_new_region(un region->ar.start = start; region->ar.end = end; region->nr_accesses = 0; - region->nr_accesses_bp = 0; for (i = 0; i < DAMON_MAX_PROBES; i++) region->probe_hits[i] = 0; INIT_LIST_HEAD(®ion->list); @@ -889,20 +888,17 @@ static void damon_update_monitoring_resu { r->last_nr_accesses = damon_nr_accesses_for_new_attrs( r->last_nr_accesses, old_attrs, new_attrs); - if (!aggregating) { + if (!aggregating) r->nr_accesses = damon_nr_accesses_for_new_attrs( r->nr_accesses, old_attrs, new_attrs); - r->nr_accesses_bp = r->nr_accesses * 10000; - } else { + else /* * if this is called in the middle of the aggregation, reset * the aggregations we made so far for this aggregation * interval. In other words, make the status like * kdamond_reset_aggregated() is called. */ - r->nr_accesses_bp = r->last_nr_accesses * 10000; r->nr_accesses = 0; - } r->age = damon_age_for_new_attrs(r->age, old_attrs, new_attrs); } @@ -3129,7 +3125,6 @@ static void damon_merge_two_regions(stru l->nr_accesses = (l->nr_accesses * sz_l + r->nr_accesses * sz_r) / (sz_l + sz_r); - l->nr_accesses_bp = l->nr_accesses * 10000; l->age = (l->age * sz_l + r->age * sz_r) / (sz_l + sz_r); l->ar.end = r->ar.end; /* todo: do this for only installed probes */ @@ -3241,7 +3236,6 @@ static void damon_split_region_at(struct new->age = r->age; new->last_nr_accesses = r->last_nr_accesses; - new->nr_accesses_bp = r->nr_accesses_bp; new->nr_accesses = r->nr_accesses; /* todo: do this for only installed probes */ memcpy(new->probe_hits, r->probe_hits, sizeof(r->probe_hits)); @@ -3849,18 +3843,6 @@ static unsigned int damon_moving_sum(uns void damon_update_region_access_rate(struct damon_region *r, bool accessed, struct damon_attrs *attrs) { - unsigned int len_window = 1; - - /* - * sample_interval can be zero, but cannot be larger than - * aggr_interval, owing to validation of damon_set_attrs(). - */ - if (attrs->sample_interval) - len_window = damon_max_nr_accesses(attrs); - r->nr_accesses_bp = damon_moving_sum(r->nr_accesses_bp, - r->last_nr_accesses * 10000, len_window, - accessed ? 10000 : 0); - if (accessed) r->nr_accesses++; } _ 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