From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BF2F606A320 for ; Tue, 1 Dec 2026 14:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=A7L1OZGX Received: by kanga.kvack.org (Postfix) id 6BD226B05CB; Tue, 1 Dec 2026 09:53:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 694AB6B05D3; Tue, 1 Dec 2026 09:53:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D0FB6B05D6; Tue, 1 Dec 2026 09:53:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3F08F6B05CB for ; Tue, 1 Dec 2026 09:53:13 -0500 (EST) Received: from smtpin21.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D16891A0DCE for ; Tue, 1 Dec 2026 14:53:12 +0000 (UTC) X-FDA: 85495707024.21.DF13B8A Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf16.hostedemail.com (Postfix) with ESMTP id 5A07C18000E for ; Tue, 1 Dec 2026 14:53:11 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=A7L1OZGX; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796136791; b=Ap7Q0wZKV2jBlwuZNlFnPZ5IK7OBryDw99f7rAY0jaXE7utPIxMglu/CYJQiNRETE/bLDa eKqjD5c4HGshqrLYY4df01+sCKCUUmSTzs+SBE9415SqQNCC8fAySERiTxPDnBvrKhyRmU RYYoxmjk7uY5z6JJFPa1jx3WXVNLVKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796136791; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=smauYZR/UYoYsbqrTUclu8ko61CGwJ1k5gxxLnFIkRY=; b=DwgkGICj6CcLczysJKxEs9CjRzWCIGBDyVSPROolrNtqbJfphfwreRlsXDCM7/Tz3jLG3P 3UJwnhB7s+kK8zR+i1rZT3P15sv4w/2Pqvc81MNhEoA5eFecJ/o0eu+dg9jFGZAkH6PKz2 1kmtrn0t0t9tzEaFN7MnABeYF1qRvrg= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=A7L1OZGX; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E3BDE6201B; Tue, 1 Dec 2026 14:53:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E2A51F000C1; Tue, 1 Dec 2026 14:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796136790; bh=smauYZR/UYoYsbqrTUclu8ko61CGwJ1k5gxxLnFIkRY=; h=From:To:Cc:Subject:Date; b=A7L1OZGXA0AJ0+A9gtlCJR1Zh/H9rSL73vS2ngy8UUlr75wPbLV6JZLOhFru0nMAk KeAGeMrGQpsf2NNZA9kAiYJKAq1wMrYLWWPfbCsomnnmXU+VEcjMkGCs0GmGTISBiO KUJOaUDu89xyddjz/Cz4LLdR2eDS1fo8zeMUVZ5hM9zzIQDRF+WbtdCSS39q5BHgto i+0pSO7QTgRlY2I1fOfxNczE4mV5xnn42eNTlM0YxFGSFnNw1xBnBdjL1acN+jH/sN 4HGBjnu0JGXzxYpe+sbcpoZJxHp8NFyaSGD7IUIvJq/r+BpnsXb0aWuYAGWk7spTNI 4rtMe9Zbj9oMg== From: SJ Park To: Cc: SJ Park , Andrew Morton , Brendan Higgins , David Gow , Jonathan Corbet , Randy Dunlap , Shuah Khan , damon@lists.linux.dev, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH v2 0/3] mm/damon: treat DAMOS core filters as a primary target selection method Date: Tue, 1 Dec 2026 06:52:58 -0800 Message-ID: <20261201145302.91868-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: 1w7sp4hemn4339wwhye577bbz1fpkaws X-Rspam-User: X-Rspamd-Queue-Id: 5A07C18000E X-Rspamd-Server: rspam12 X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-HE-Tag: 1796136791-808806 X-HE-Meta: U2FsdGVkX1/Yqken2ia4aZmBKbiB+cL3XOMURvtmgPeebcS1AgMDGop/LuU3eyIljcYStgUPXmb5GQCCkkcp9UA+e+ZpTlFrYxEwc/TkWBn/AlaYTR0/WJ5teQsd6+HS+6TEdiNwbrbNlB/175n4VerxT2f6K7nFf2jIfQ1VMxedsEfgk0nu5osHSPw4EoeAMDnPpvB2c4EwF4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CrXW3dDaZherkamlg7ElfQDNRjzO+zF0vUviDPgpRxU1Dx4jskdJHLfWIqr0HuMV1iSawEQpJBoB4rQXZCBRYUDjJfg8uRLTNzHsXsSEjE7lRxorNVZBm4aNpYvTvrckyEe2Sh0UAmQVnjS1UjiqbaRKHMDLdxkUc= Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 DAMOS access pattern and core filters are treated as a primary and a secondary target selection method, respectively. DAMOS target regions are initially selected with the access pattern, and later evaluated for the core filters only when needed, in the middle of lower level operations. DAMOS quota goal type eligible_mem_bp is ignoring the core filters. There is no real reason to treat DAMOS core filters as a secondary method, though. DAMOS stats treat core filter rejections the same to access pattern-based rejections. The core filters are effectively applied for every operation. The duplicated handling of the filters in each operation only makes it easy to mistake. Promote DAMOS core filters to a primary target selection method. Use it in the central high level place that DAMOS access pattern is handled. One consequence of this change is the behavioral change of eligible_mem_bp DAMOS quota goal type. It was ignoring core filters. This change makes it aware of core filters. It is difficult to imagine real users that depend on the old behavior. And the new behavior is more intuitive in my opinion. Remove unit tests that were too duplicated and will fail after the change, via patch 1. Make the promotion via patch 2. Clarify the changed eligible_mem_bp behavior on the design document, via patch 3. Changes from RFC - RFC: https://lore.kernel.org/20261130152242.90137-1-sj@kernel.org - Restore dasmos_test_apply_scheme_quota_sz(). - Rebase to the latest mm-new. SJ Park (3): mm/damon/tests/core-kunit: drop apply_scheme()-internal filter tests mm/damon/core: apply damos core filter in __damos_valid_target() Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior Documentation/mm/damon/design.rst | 4 +- mm/damon/core.c | 26 ++-- mm/damon/tests/core-kunit.h | 210 ------------------------------ 3 files changed, 17 insertions(+), 223 deletions(-) base-commit: 872ceec1e3caf227655a58f7407a9c8493dcf56f -- 2.47.3