From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796224526; b=ci6gi+KIfUktheWBe67Xf/e4x9+AANkCEyl3ppWsC9UH9OmIkBxZPkMCvic5Cc8O9Is5 mfJXMhZrHw2UVuaROy3xAqxzwgef4oA8RBk/YR8GpU+x6uk1cLMIxU8yUydiX5dWq3FEQ ZCb+QZYTdfo2T5g0yPsOK2Z0M1IxdA0Jj6mBDG9zBbf5npuug/9sWymH3A3P4zCSCldWI DsBuE9YXo/BZwLIyKGWZ5xEaql5ER7zd08xZPJ/RAu/tYk3BBem6dcDhei06do68+XPV6 Hy9ggl9WFcEs+/kZlTIPjqCDBW+fSZryz2fjUj3OMKBWpzYCyaqJVUPrjkYaTwH/Vmw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796224526; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=rpjSOudJZefSg+APepBn8eruaaHmV8Pfj5JXYfl0ovU=; b=nFROGhDxslirI6UNkfJytDGMamnBn2pafPnvlRcKyLFRoBbSxKPvMOA963JyTu5uJ+BX 64Qlo9kQhXeUskTacgIJBYMrHB3vJdc//Fk7Kw4uqqzbWCwVsqKGX0PGUHNb2PAcAPwWj nNMrd9KCoWNOhAHFwGA5PM0asvoO5OcGRPOLBfj3JxZeARESC1P6qA//DwML0dWb3EXl4 EM+PyVb9miWdbQWErlF8MMQID9ZlMEGd+PDs512l+h9MWa6fYEg9HIz2n+7eJxiDQ/Q+O VbWzriSGyFHHP8moRQJEQQr/oqTVjHbMgu+30SNCM/Msq2kp1/X+gUAq/gRI3zHsl9Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YRIM5d3v; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7925606A31A; Wed, 2 Dec 2026 15:15:26 +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=YRIM5d3v Received: by smtp.kernel.org (Postfix) with ESMTPSA id 188341F00893; Wed, 2 Dec 2026 15:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796224526; bh=rpjSOudJZefSg+APepBn8eruaaHmV8Pfj5JXYfl0ovU=; h=From:To:Cc:Subject:Date; b=YRIM5d3vQU3p1tVjeOZ+/UXsBLkXNIvbhjKL85J5IjR1dvNmrTy5uXk/qU2vVBoL9 4gSsE17zU1NdXPTCqZbRhol/haKGQVTYsc7yWYt8Zp4/G8OvBPMVTQOLtPyct9b4DV 0ebjpPa/CQ0/f2rQqp9ify5NRXCOSgzF9JoK1RsZDLi8/rSmzLEsPufTFtsqsW7tPY 0royn4vxrnSgWht+Z+qe3g7gXRcbJgYYR4iJLVWk2AlbAOJBTFcJfnPtCoWgMb0JFi dMkSufeay7CnmNKl+umNQDiN0hkHWFhDfUMRG+7WYyn/+L0gqCp0PRwAKZlNTfr6fJ 4/DJC06D2C2ng== From: SJ Park To: Andrew Morton Cc: SJ Park , 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: [PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method Date: Wed, 2 Dec 2026 07:15:14 -0800 Message-ID: <20261202151518.618069-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 v2 - RFC v2: https://lore.kernel.org/20261201145302.91868-1-sj@kernel.org - Rebase to the latest mm-new. - Drop RFC. 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: 1a7610248a3802e38124ce66b07eef12277be9a0 -- 2.47.3