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=1796136791; b=oypWE1dcE7LvnoKYqERjU1IGJlsDvPDCuIgAThZhSeWgrSZFFzR1kcBTH9xay1c9LRNk 5d4xzCwLT7VN/O0M48myJOAp5vCuBT6KpGaTjPd+WnS/tx7AgNQUFDg4B1QAeSkvoRDXx MYbJA2CcyDS3Dwgh8ImfPcQjwfa/bZEJhQVXMnEgKJBCMmnOL2Cc7PQcUbqg8Sa0W/XJS uF0VRcpDOSIqYd5BLvG/3UfHXXxwCRb0DW9WZdSps6AFQiohWbBVrx7JkjSntI69kOabt 9q1cr0P4AoNfcEdgjrM2+EVYHnl+MjvYXyNF8BJ9f60YV0sfCUTaSd2zGEkVYbdha4A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796136791; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=smauYZR/UYoYsbqrTUclu8ko61CGwJ1k5gxxLnFIkRY=; b=ooEw8EdKGfIK2uujiO5Iuw+YNMWOrPlnY1bgjBX3rSfsBLc78xCCVnpntFS6Wl0nIyFe o8tU2lI/f1gRBbzsBr1olvaBS/XwK3zxN6C3VEgTRPa47IT+5y4pdgX3T9fRhidrOtYHp kEhHeA1RfZXIhH7elsW/JKYIM07a+TUlMmxbRqi+dU6olcy82DO7xoauS694Im1pUC3fu xMEtJe3r53Ita6FEiCAmdd4QJxzzzyg1kaXpYb16oE6r71kk79n32A6w+8i4dq1akMp38 cRI6ioy+L2xcbga2Ux2bzqpzau/YQAzN/x0laKuHcW3gEhYuKgPyHRJbHClf4F/L2wQ== 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=A7L1OZGX; 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 18918606A320; Tue, 1 Dec 2026 14:53:10 +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 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-Mailing-List: damon@lists.linux.dev 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 - 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