From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 556AC18870C; Thu, 26 Dec 2024 22:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251300; cv=none; b=l5TKGmpkFWXKOBifJjQLnrmhc0fdTsd3L6lwbecElClzQuC4l928g2vOKqenYzuqQCHffYkL0nJmSgBeQ52CwE7aGtca0gwW02qG1xRsAEAwLHTZR3ESyVnCm+vpM8+v0b/YetU/eCtTggFXLHox0UgcOy58Uj0xqE+QRmagAns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251300; c=relaxed/simple; bh=BqfFuozL0F0mxvXeJ3OdZ9G2Y0SIHcS2uBA23Vwog2k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fOMZ5DZWDk9U6YSmBfDvkNMj3FOr6Zo2cbmPFZ7toXTfgIrQ+Mxx91wGz7A6sk6+7iU9cI0/yLbo2stD0hH8cYzp4KK8JBOY1PwSiK+YukDY3zEvD2pHh/2BQppi3Hj0xevLJVk+gCIilEy+9pETBkWE3lg4OSuJfKanntwGtu4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aZ+ftHr1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aZ+ftHr1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD8D6C4CED3; Thu, 26 Dec 2024 22:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251300; bh=BqfFuozL0F0mxvXeJ3OdZ9G2Y0SIHcS2uBA23Vwog2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aZ+ftHr1CkAH5F63FDXtw0/BlvymU//usYo7FSrg35NHQ1sYDG48BuoNLXlHBZcsI hn8XzMUIJRlJZW13Bn6vnDqyHQtTJXKhomujUWTXi3SjjR0YQRGeW7qxs4O4akLgTA eELMnCRHUJ5GlQ0J4b8ds3pHxVNxRopSGsRkr9p9IIIIbSbylGw+uSvbETncTDMQZz 5uH/Da7PfzmNxtiUyvEVNRjehKnEyFLZY3n3DWaGIBjBWga6bW/3z7f8tAPzwtrnSC bMPOiWeRL3btA7IXiJ5xDPRnqZPfN/MBeej8hcQedLut33s1yd2jCAlTlcOpTpJ0ng WYDj6Qh9EfzjQ== From: SeongJae Park To: Cc: SeongJae Park , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 01/10] mm/damon: fixup damos_filter kernel-doc Date: Thu, 26 Dec 2024 14:14:36 -0800 Message-Id: <20241226221445.78433-2-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The comment is slightly wrong. DAMOS filters are not only for pages, but general bytes of memory. Also the description of 'matching' is bit confusing, since DAMOS filters do only filtering out. Update the comments to be less confusing. Signed-off-by: SeongJae Park --- include/linux/damon.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 18449b5c45df..15f098372672 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -347,8 +347,8 @@ enum damos_filter_type { =20 /** * struct damos_filter - DAMOS action target memory filter. - * @type: Type of the page. - * @matching: If the matching page should filtered out or in. + * @type: Type of the target memory. + * @matching: If the @type-matching memory should be filtered out. * @memcg_id: Memcg id of the question if @type is DAMOS_FILTER_MEMCG. * @addr_range: Address range if @type is DAMOS_FILTER_TYPE_ADDR. * @target_idx: Index of the &struct damon_target of @@ -357,9 +357,10 @@ enum damos_filter_type { * @list: List head for siblings. * * Before applying the &damos->action to a memory region, DAMOS checks if = each - * page of the region matches to this and avoid applying the action if so. - * Support of each filter type depends on the running &struct damon_operat= ions - * and the type. Refer to &enum damos_filter_type for more detai. + * byte of the region matches to this given condition and avoid applying t= he + * action if so. Support of each filter type depends on the running &stru= ct + * damon_operations and the type. Refer to &enum damos_filter_type for mo= re + * details. */ struct damos_filter { enum damos_filter_type type; --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 37B0E1B415D; Thu, 26 Dec 2024 22:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251301; cv=none; b=O/bEw9SgTnWAUqIq+F8xJVgKFwSs+LJJb2G3Uy1xGp8UE1NDQ9ylv3CA7C2rq8V1tLH5D3vur5tz+GTfBtsvC41P/ne1fCUTeMeb/JwBN+6bk0yJEvGWWeK8eaAr2itWTKHDpE0FoFqSmXiAP7GSGfMH9hHIkYtIQzYoEJq5yRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251301; c=relaxed/simple; bh=DCAC3zBpwSlEJOxW64cidA0UEg6r7ucuAwa/fXFsTMo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Loe4SO+OYGa2PFak/7JaGwyH8lO6LAaCQPn5/8H/Ie/aT0XrCwYyyY/kZroN3rMrVvXjKkW0ulzl515hLPOkRCxtFMd1m+N9fwJrBGuZIESpacEQxIjEAVf9UAxZU5GcHzEYErIKYpB2QNFQWHesFsK/G/SmV/LSMokFczXVsi8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UTFUat3S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UTFUat3S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6336C4CEDC; Thu, 26 Dec 2024 22:15:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251301; bh=DCAC3zBpwSlEJOxW64cidA0UEg6r7ucuAwa/fXFsTMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UTFUat3SOgqfEEZJflyn3JCmKPWPiVLSkX5iWTSvS8HbRowJLpHcRXE8CkToU7yng q9LcpJvsRvtAEEM6LOqsAMgcm9JDVwZC7U6E14+p0CwctP/OtYhiwFol5MugS7WPbr n8W+iXE9TRBPEbLOFuiunssyQk65luJPPIEgJyo+b8wxqRIvImB+wxvowRWOF0oqb8 7tJD//H7GqLp0Ez6JbFfOCn6CUcbjxvnCYwg2r7qdYjNWjYRiEDmCrbS+UL8Zd4YxD LZHD95G78KCKjZFmkix0ubtZgugm2mjboK4jSlbhQw5V1q/nHhbgq4b2tZ4tacL6fG yrAsNmCBn7Zgg== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 02/10] mm/damon/core: add damos_filter->pass field Date: Thu, 26 Dec 2024 14:14:37 -0800 Message-Id: <20241226221445.78433-3-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" DAMOS filters work as only exclusive (block) filters. This makes it easy to be confused, and restrictive at combining multiple filters for various types of memory. To extend DAMOS filters for inclusion behavior, add a filed to damos_filter. Following commits will make the field to decide whether the filter should work as an exclusive (block) filter, or an inclusive (pass) filter. Signed-off-by: SeongJae Park --- include/linux/damon.h | 4 +++- mm/damon/core.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 15f098372672..122c30e4ce19 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -348,7 +348,8 @@ enum damos_filter_type { /** * struct damos_filter - DAMOS action target memory filter. * @type: Type of the target memory. - * @matching: If the @type-matching memory should be filtered out. + * @matching: Whether this is for @type-matching memory. + * @pass: Whether the memory should pass-through the filter. * @memcg_id: Memcg id of the question if @type is DAMOS_FILTER_MEMCG. * @addr_range: Address range if @type is DAMOS_FILTER_TYPE_ADDR. * @target_idx: Index of the &struct damon_target of @@ -365,6 +366,7 @@ enum damos_filter_type { struct damos_filter { enum damos_filter_type type; bool matching; + bool pass; union { unsigned short memcg_id; struct damon_addr_range addr_range; diff --git a/mm/damon/core.c b/mm/damon/core.c index 52e50f183ffe..e54bd19d6f06 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -275,6 +275,7 @@ struct damos_filter *damos_new_filter(enum damos_filter= _type type, return NULL; filter->type =3D type; filter->matching =3D matching; + filter->pass =3D false; INIT_LIST_HEAD(&filter->list); return filter; } --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A768B1C3BF4; Thu, 26 Dec 2024 22:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251302; cv=none; b=CE9WOOS0V21cTQExrIBVSh0elDPLGnBINA4SN4+ZwoxlzPJMM9NZKaHfFgYbUZ9GXb3C3YMSgGjDEY6t0qVUFSbKPkw8ttg0rLV1NG3qJU/KpMFHSKxBPBQdAEvij5FmdYkxQlyoXj3g0zCqFjjTXrR3q6FEU5W7OdC4FFUGaCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251302; c=relaxed/simple; bh=8lAFL71XcvweH0oiSZgfTeKqV2YhADAZUO4RhEVof+M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o1+WKKMx4UtlRmDaVuuVd57yqs2kkNClBVoitNCcgtCiil6Y86rchHsZ2CaqaYJapDEHjfrnogvuOv+UQxehZnJMHy+pGuOL7Kgpctc3mZwLWTA99wIdJwAYpJ5RhDiz65hz/aa/LSOBbJkYJQJY7LIU2IDqBGccigIvd4fWYz8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z9IcquRo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z9IcquRo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0557DC4CEE0; Thu, 26 Dec 2024 22:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251302; bh=8lAFL71XcvweH0oiSZgfTeKqV2YhADAZUO4RhEVof+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z9IcquRomrqtfrXinUoNaq9+LqgDLr3RafzI/eSAraalwzMf6S7fnPCgPAl5KxSFw zsy+A0+Lm/+DNxEl1afKWgykWPImxukIdQbwmZrIaOVNqmkekNg+PrRtZa3NB09Bo4 dkkUjqXopVWZuXiesXbcCrfoVIDtX/vEtdmG1Qv3TO8cgEz5GG+AFAMDYUqDo/39AM q5X04z4lqWR+cqzPaEqYKmJPkvF+FBDIAuwvhSoghnIpb35DoI48ewPfAtnXIwaZbO 78on1CmjcqmTiT9gA90Lgk8Q6EzNCuxGWCkduYpYcP4+n0dmibxe7Nwul8pTFb1KWK StPoR5Bi2E2ZA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 03/10] mm/damon/core: support damos_filter->pass Date: Thu, 26 Dec 2024 14:14:38 -0800 Message-Id: <20241226221445.78433-4-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" DAMON core logic is ignoring damos_filter->pass by assuming the value will be false. Respect it by dropping the assumption and reading the field when making the decision to whether filter out or in a region. Note that DAMOS action can be applied to any memory if no filter is installed, and DAMOS filters work only for memory that satisfies the 'type' and 'matching'. Hence installing pass filters without any block filter after them makes no filter-behavioral change. Signed-off-by: SeongJae Park --- mm/damon/core.c | 6 +++--- mm/damon/tests/core-kunit.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index e54bd19d6f06..71db2c754e6d 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1374,7 +1374,7 @@ static void damos_update_stat(struct damos *s, s->stat.sz_ops_filter_passed +=3D sz_ops_filter_passed; } =20 -static bool __damos_filter_out(struct damon_ctx *ctx, struct damon_target = *t, +static bool damos_filter_match(struct damon_ctx *ctx, struct damon_target = *t, struct damon_region *r, struct damos_filter *filter) { bool matched =3D false; @@ -1428,8 +1428,8 @@ static bool damos_filter_out(struct damon_ctx *ctx, s= truct damon_target *t, struct damos_filter *filter; =20 damos_for_each_filter(filter, s) { - if (__damos_filter_out(ctx, t, r, filter)) - return true; + if (damos_filter_match(ctx, t, r, filter)) + return !filter->pass; } return false; } diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index cf22e09a3507..8f58d3424c21 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -434,25 +434,25 @@ static void damos_test_filter_out(struct kunit *test) damon_add_region(r, t); =20 /* region in the range */ - KUNIT_EXPECT_TRUE(test, __damos_filter_out(NULL, t, r, f)); + KUNIT_EXPECT_TRUE(test, damos_filter_match(NULL, t, r, f)); KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1); =20 /* region before the range */ r->ar.start =3D DAMON_MIN_REGION * 1; r->ar.end =3D DAMON_MIN_REGION * 2; - KUNIT_EXPECT_FALSE(test, __damos_filter_out(NULL, t, r, f)); + KUNIT_EXPECT_FALSE(test, damos_filter_match(NULL, t, r, f)); KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1); =20 /* region after the range */ r->ar.start =3D DAMON_MIN_REGION * 6; r->ar.end =3D DAMON_MIN_REGION * 8; - KUNIT_EXPECT_FALSE(test, __damos_filter_out(NULL, t, r, f)); + KUNIT_EXPECT_FALSE(test, damos_filter_match(NULL, t, r, f)); KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1); =20 /* region started before the range */ r->ar.start =3D DAMON_MIN_REGION * 1; r->ar.end =3D DAMON_MIN_REGION * 4; - KUNIT_EXPECT_FALSE(test, __damos_filter_out(NULL, t, r, f)); + KUNIT_EXPECT_FALSE(test, damos_filter_match(NULL, t, r, f)); /* filter should have split the region */ KUNIT_EXPECT_EQ(test, r->ar.start, DAMON_MIN_REGION * 1); KUNIT_EXPECT_EQ(test, r->ar.end, DAMON_MIN_REGION * 2); @@ -465,7 +465,7 @@ static void damos_test_filter_out(struct kunit *test) /* region started in the range */ r->ar.start =3D DAMON_MIN_REGION * 2; r->ar.end =3D DAMON_MIN_REGION * 8; - KUNIT_EXPECT_TRUE(test, __damos_filter_out(NULL, t, r, f)); + KUNIT_EXPECT_TRUE(test, damos_filter_match(NULL, t, r, f)); /* filter should have split the region */ KUNIT_EXPECT_EQ(test, r->ar.start, DAMON_MIN_REGION * 2); KUNIT_EXPECT_EQ(test, r->ar.end, DAMON_MIN_REGION * 6); --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A9A261C54AC; Thu, 26 Dec 2024 22:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251303; cv=none; b=iRl53geeW2LA5a/1VMKGpZr/IFbYAYI3umXU0VlAmMdhhI6tnEcOo8X5tpzHIV96pSFKKK6RvScjYur9jocZt8LqY9+BtpF25FAfAM9YBlGXMU3lB1jHXILhSotsBmaY5jwPPKqzWR7jWAAlKZi8iqEGONpF/z6rv0PPIe12o9A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251303; c=relaxed/simple; bh=SeMHzC1M39t8q6CCCk8soRnhB4lB7Sy3qIRyk7EYfrE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JwXdFabGFqNyIBCDc0FiRPqeLqAo8lfXd4wwojpjjxLapzv/W3n+LTNh4IDbjxQ+Yj22kYnzmWYA+xnUVfVL5EycBBExxKdE3az3id3eSSo6z/JCIiWROVZYr5BDIBTBulZsBSdfn78nng6TLyz3fLTNPA6vWQmDtzve8jA7LBU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fQElKYiZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fQElKYiZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1503EC4CED3; Thu, 26 Dec 2024 22:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251303; bh=SeMHzC1M39t8q6CCCk8soRnhB4lB7Sy3qIRyk7EYfrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fQElKYiZrPg10ZTDGDGyOYXrYb40QGFH1A9Y1Nu+H2xaepgLZrm/1KOAOPnpknTJM SmP9DEpnyiJ+XJFxdT2OadsMaV1fnfgO8i3WagP7Qr0nZpl3nn7xrUrhx9qlzPxeGr 1iltpyUwvAxgkY4reWZBID4op2SRkyO1WWlfWo2ZPYrLAFgoVFeIgkR6dbA5Fqr6Mj DgfSG3uP2K5EiMtRjSqSKmzOSubKrTR6wIVrFRfpneJTvThwlTFHlpEBX8HuwrmUPr zPCPzDUo18dVoUrPk3dcUE0DO3ub++l8qwhumfRJsKly23bi683QmfcyQDauxw5AXz HuVVFKKHEfaVA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 04/10] mm/damon/paddr: support damos_filter->pass Date: Thu, 26 Dec 2024 14:14:39 -0800 Message-Id: <20241226221445.78433-5-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'paddr', a DAMON operations set implementation for the physical address space supports a few types of DAMOS filters (anon, memcg and young), but ignoring the ->pass field. Update the logic to support the behavior. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index b0c283808ba6..71cb02128b46 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -198,7 +198,7 @@ static unsigned int damon_pa_check_accesses(struct damo= n_ctx *ctx) return max_nr_accesses; } =20 -static bool __damos_pa_filter_out(struct damos_filter *filter, +static bool damos_pa_filter_match(struct damos_filter *filter, struct folio *folio) { bool matched =3D false; @@ -237,8 +237,8 @@ static bool damos_pa_filter_out(struct damos *scheme, s= truct folio *folio) struct damos_filter *filter; =20 damos_for_each_filter(filter, scheme) { - if (__damos_pa_filter_out(filter, folio)) - return true; + if (damos_pa_filter_match(filter, folio)) + return !filter->pass; } return false; } --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BE5011C8FB4; Thu, 26 Dec 2024 22:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251304; cv=none; b=F6TpyPBLo9BsIVRJnTE7c7hHN29dZHs7OdlEYeEjsCby0Itd3gvIYBokoYwzQeoga0I0qaOpDBx0KvNuAei9yFIE2HsPwc/F8f3+nYqYyzZv5XuBKC4KcXjI+H41GsGTwLzja2l76yhnqP/nMExaQ71qDenbTJCcUrJqbskUYd4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251304; c=relaxed/simple; bh=xPDKx+cgGKS4vL2pTXGyaq2E/e6yLYc/uyg/ecrFVG0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B9mqUxOIZpFdCxa7sGAAkALhGDyOYaWPL9fgQsaM6u33FqAxzcMeTmFsd1HRdYiHsGUr7TptDlVXerq1ICrn1rMeRO4s5IpcD2fdxQvKligG7i7zec9m1/zT8DbP8fJ8tpE8jbhu/rAkVGF2Dp1umohawCMfAwBkKOAdQv5kNyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HsdVucsV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HsdVucsV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22AC5C4CEDD; Thu, 26 Dec 2024 22:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251304; bh=xPDKx+cgGKS4vL2pTXGyaq2E/e6yLYc/uyg/ecrFVG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HsdVucsV8Wau5wOaeCDCDIUEIxj140sC2qCi314hJXw9NQSbgGwj80fp7tQAft9vO FyiLvn1wUUepP3anXtz8n+hsHp1zruw76xWlrUMqR9EWFGXkWTGGAQcVzhgcJ98XYq rbEKcYuplAYaD3mt0knO7evq+zCwUUJu0Vwq7+ozUKo/L5h4jPcR18+bo3q47yE2Pj DoLdhzRHoPVAwVzgK2/r5I6O5wF+l/YcYL9Ot7tutCoh3Q4Dblcgv4J/ly7U3pDE3U 8khMFW39XMka8uPqzIq9oExKuWSQ5I5qoF6Jwf0BfLKvW8DtHeo9WKGsvClh7EU+Un tPoPa5rI5ZfjQ== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 05/10] mm/damon: add pass argument to damos_new_filter() Date: Thu, 26 Dec 2024 14:14:40 -0800 Message-Id: <20241226221445.78433-6-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" damos_new_filter() sets damos_filter->pass as false always. The API users hence should manually set the field to use the filter as a pass filter. It is cumbersome and easy to mistake. Add an arugment for setting the field to damos_new_filter(). Signed-off-by: SeongJae Park --- include/linux/damon.h | 2 +- mm/damon/core.c | 7 ++++--- mm/damon/paddr.c | 3 ++- mm/damon/reclaim.c | 2 +- mm/damon/sysfs-schemes.c | 2 +- mm/damon/tests/core-kunit.h | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 122c30e4ce19..ad0360711aca 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -801,7 +801,7 @@ void damon_update_region_access_rate(struct damon_regio= n *r, bool accessed, struct damon_attrs *attrs); =20 struct damos_filter *damos_new_filter(enum damos_filter_type type, - bool matching); + bool matching, bool pass); void damos_add_filter(struct damos *s, struct damos_filter *f); void damos_destroy_filter(struct damos_filter *f); =20 diff --git a/mm/damon/core.c b/mm/damon/core.c index 71db2c754e6d..13f12d82de5f 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -266,7 +266,7 @@ int damon_set_regions(struct damon_target *t, struct da= mon_addr_range *ranges, } =20 struct damos_filter *damos_new_filter(enum damos_filter_type type, - bool matching) + bool matching, bool pass) { struct damos_filter *filter; =20 @@ -275,7 +275,7 @@ struct damos_filter *damos_new_filter(enum damos_filter= _type type, return NULL; filter->type =3D type; filter->matching =3D matching; - filter->pass =3D false; + filter->pass =3D pass; INIT_LIST_HEAD(&filter->list); return filter; } @@ -806,7 +806,8 @@ static int damos_commit_filters(struct damos *dst, stru= ct damos *src) continue; =20 new_filter =3D damos_new_filter( - src_filter->type, src_filter->matching); + src_filter->type, src_filter->matching, + src_filter->pass); if (!new_filter) return -ENOMEM; damos_commit_filter_arg(new_filter, src_filter); diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 71cb02128b46..cd89500efc22 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -259,7 +259,8 @@ static unsigned long damon_pa_pageout(struct damon_regi= on *r, struct damos *s, } } if (install_young_filter) { - filter =3D damos_new_filter(DAMOS_FILTER_TYPE_YOUNG, true); + filter =3D damos_new_filter( + DAMOS_FILTER_TYPE_YOUNG, true, false); if (!filter) return 0; damos_add_filter(s, filter); diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index 9e0077a9404e..a675150965e0 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -221,7 +221,7 @@ static int damon_reclaim_apply_parameters(void) } =20 if (skip_anon) { - filter =3D damos_new_filter(DAMOS_FILTER_TYPE_ANON, true); + filter =3D damos_new_filter(DAMOS_FILTER_TYPE_ANON, true, false); if (!filter) goto out; damos_add_filter(scheme, filter); diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index deeaf23c1fcf..9a883e8aea1c 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1901,7 +1901,7 @@ static int damon_sysfs_add_scheme_filters(struct damo= s *scheme, sysfs_filters->filters_arr[i]; struct damos_filter *filter =3D damos_new_filter(sysfs_filter->type, - sysfs_filter->matching); + sysfs_filter->matching, false); int err; =20 if (!filter) diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h index 8f58d3424c21..532c6a6f21f9 100644 --- a/mm/damon/tests/core-kunit.h +++ b/mm/damon/tests/core-kunit.h @@ -411,7 +411,7 @@ static void damos_test_new_filter(struct kunit *test) { struct damos_filter *filter; =20 - filter =3D damos_new_filter(DAMOS_FILTER_TYPE_ANON, true); + filter =3D damos_new_filter(DAMOS_FILTER_TYPE_ANON, true, false); KUNIT_EXPECT_EQ(test, filter->type, DAMOS_FILTER_TYPE_ANON); KUNIT_EXPECT_EQ(test, filter->matching, true); KUNIT_EXPECT_PTR_EQ(test, filter->list.prev, &filter->list); @@ -425,7 +425,7 @@ static void damos_test_filter_out(struct kunit *test) struct damon_region *r, *r2; struct damos_filter *f; =20 - f =3D damos_new_filter(DAMOS_FILTER_TYPE_ADDR, true); + f =3D damos_new_filter(DAMOS_FILTER_TYPE_ADDR, true, false); f->addr_range =3D (struct damon_addr_range){ .start =3D DAMON_MIN_REGION * 2, .end =3D DAMON_MIN_REGION * 6}; =20 --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 80E591CCEED; Thu, 26 Dec 2024 22:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251305; cv=none; b=phqX2POa5mOuVh6z5hGz1nN40b+kWIgZwSglcwsvdFlVk2Br9I8DxdkqapLkD2UxmP1U6HCIm0IuAj0ZJZqWQzCp6G7o8AU1iFg0nz3Z6EZmZFgJ3N3bGU043nu0SGV6uJhkwbnqGrRwJXCthatLZf5nKGODF5broSUJ6QFO4tE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251305; c=relaxed/simple; bh=ZERQXRIpbhEDVEpD6J6LgTdFsTQpbeeZuCqI48fC6sI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o5oVHWlBZ12DGtiJLnWrmiEU7ctbPWSiZSa9d2IJkm+tRUd1mn2U7yosylghey96K22UvJRbh5PtFpOL7hbVsH1+VFlnc6NQ7CDINgFgsU23NoIBc8bxzDewdkRA5uNyj3kUMs1jTardFLCBsrKkJWnux8RZf0TcF35xOzV4C9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B9hDwO1E; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B9hDwO1E" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37E88C4CED1; Thu, 26 Dec 2024 22:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251305; bh=ZERQXRIpbhEDVEpD6J6LgTdFsTQpbeeZuCqI48fC6sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B9hDwO1ET56DJbfUvA1NkwrMAmS4uGKkC/pY+lnPyDmXlFzZblsZPOf/hRnvjug2D Ijv/xdiTSf31U6r5mgZI+BBwJ1GgfipaG4Y1gOwChrjrnck9kcooqb522+Q1WRRJW8 6eGsDotNEvfM9quAQC1lcy/iuYXEjpfPRimjwTcBCFiGcfw0ZH+sl8vf7orfi+xnmv 6eQ9M3oA52KByjBcgcZmWHa1dni6RtyulWyT/RC9EOB/cJ5n9LMBE+u7n+wp6Frr4z zlfg3TPUFFZU00E4AWCp8Ikpg1SP/bwQTc38d5oWrfVgxHX+f4qxL4HSaSIhYk/PSU 1JGgegHMZXyrA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 06/10] mm/damon/sysfs-schemes: add a file for setting damos_filter->pass Date: Thu, 26 Dec 2024 14:14:41 -0800 Message-Id: <20241226221445.78433-7-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Only kernel-space DAMON API users can use inclusive DAMOS filters. Add a sysfs file named 'pass' under DAMOS filter directory of DAMON sysfs interface, to let the user-space users use inclusive DAMOS filters. Signed-off-by: SeongJae Park --- mm/damon/sysfs-schemes.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 9a883e8aea1c..9e171046ee94 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -313,6 +313,7 @@ struct damon_sysfs_scheme_filter { struct kobject kobj; enum damos_filter_type type; bool matching; + bool pass; char *memcg_path; struct damon_addr_range addr_range; int target_idx; @@ -385,6 +386,30 @@ static ssize_t matching_store(struct kobject *kobj, return count; } =20 +static ssize_t pass_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + struct damon_sysfs_scheme_filter *filter =3D container_of(kobj, + struct damon_sysfs_scheme_filter, kobj); + + return sysfs_emit(buf, "%c\n", filter->pass ? 'Y' : 'N'); +} + +static ssize_t pass_store(struct kobject *kobj, + struct kobj_attribute *attr, const char *buf, size_t count) +{ + struct damon_sysfs_scheme_filter *filter =3D container_of(kobj, + struct damon_sysfs_scheme_filter, kobj); + bool pass; + int err =3D kstrtobool(buf, &pass); + + if (err) + return err; + + filter->pass =3D pass; + return count; +} + static ssize_t memcg_path_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { @@ -482,6 +507,9 @@ static struct kobj_attribute damon_sysfs_scheme_filter_= type_attr =3D static struct kobj_attribute damon_sysfs_scheme_filter_matching_attr =3D __ATTR_RW_MODE(matching, 0600); =20 +static struct kobj_attribute damon_sysfs_scheme_filter_pass_attr =3D + __ATTR_RW_MODE(pass, 0600); + static struct kobj_attribute damon_sysfs_scheme_filter_memcg_path_attr =3D __ATTR_RW_MODE(memcg_path, 0600); =20 @@ -497,6 +525,7 @@ static struct kobj_attribute damon_sysfs_scheme_filter_= damon_target_idx_attr =3D static struct attribute *damon_sysfs_scheme_filter_attrs[] =3D { &damon_sysfs_scheme_filter_type_attr.attr, &damon_sysfs_scheme_filter_matching_attr.attr, + &damon_sysfs_scheme_filter_pass_attr.attr, &damon_sysfs_scheme_filter_memcg_path_attr.attr, &damon_sysfs_scheme_filter_addr_start_attr.attr, &damon_sysfs_scheme_filter_addr_end_attr.attr, @@ -1901,7 +1930,8 @@ static int damon_sysfs_add_scheme_filters(struct damo= s *scheme, sysfs_filters->filters_arr[i]; struct damos_filter *filter =3D damos_new_filter(sysfs_filter->type, - sysfs_filter->matching, false); + sysfs_filter->matching, + sysfs_filter->pass); int err; =20 if (!filter) --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9C4C81CEAD0; Thu, 26 Dec 2024 22:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251306; cv=none; b=SVihn6qhOJtB5tCnDemc287U5T1xbE7lZEWfdQffebajp0840L44448J3f9ChrMcKjsEndaG1NUpfMQ1nb/MK3AxLSPoCYteJ8cV0efLXd2jjpjgNySpKtN3DLoKfqxSFYnxyM4CpO66soW4US9wOh/v8cScP/AvPq6NlttJzak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251306; c=relaxed/simple; bh=//vhFtbVl0HM6He0HK/Z+ZVxsC9xYIvf1nEXj2Zge2g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UsXd6kk9QWZ7i1JQN7uuvyHje8gqVbUG1T2ewgL+x7vh29ZgAlatQ+4Lz8vteqNVz2p3cUi6u+P6w9zH9PXlB0L+zvD2CzEwJod9EttqXEJV6kxcmvt9K9p+3YzgJE2lCtfFzKsfM+bkOfmWrUBoJ+ph63f5DU3xKpYv8W7eB9w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rp1/LE7w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rp1/LE7w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5282AC4CEDC; Thu, 26 Dec 2024 22:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251306; bh=//vhFtbVl0HM6He0HK/Z+ZVxsC9xYIvf1nEXj2Zge2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rp1/LE7wL75YYPfqE6SY8gZNoaSFeZEa7VCvo/p2eTd0835XsUSEdUd72yQOjrOqv VpSJXimUnRRGeWrvbBQxqWXKAprKqYpFlTiGYm8Ut41GFZiEymEFh1RSnJNLyeCOtm LPo3Nz8X5PR+wBLZQHV5syAt1hTIpXz4a9GqmrLARSD5ZPqV5Bcl5hrl5wtGQJxVDQ 8EDKNtOiHzdjP3TC62fpO9VGP9c3vh/rGSJpqj0yTsq9OqJkS53vSq4CFlafKNHv86 BQ4HUUWEQK2+GO87ss3pG5IAd/CR+8BBeHYYBHXLNW2+c2bsxXKqOiQlhERn7hJnZ5 sV/wL+qtF8bWA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, kernel-team@meta.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 07/10] Docs/mm/damon/design: document pass/block filters behaviors Date: Thu, 26 Dec 2024 14:14:42 -0800 Message-Id: <20241226221445.78433-8-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update DAMOS filters design document to describe the pass/block behavior of filters. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 5ebb572d0999..0265aaef2544 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -504,9 +504,30 @@ have a list of latency-critical processes. =20 To let users optimize DAMOS schemes with such special knowledge, DAMOS pro= vides a feature called DAMOS filters. The feature allows users to set an arbitr= ary -number of filters for each scheme. Each filter specifies the type of targ= et -memory, and whether it should exclude the memory of the type (filter-out),= or -all except the memory of the type (filter-in). +number of filters for each scheme. Each filter specifies + +- a type of memory (``type``), +- whether it is for the memory of the type or all except the type + (``matching``), and +- whether it is to allow (pass through the filter) or reject (block) apply= ing + the scheme's action to the memory (``pass``). + +When multiple filters are installed, each filter is applied in the install= ed +order. If a memory is matched to one of the filter, followup filters are +ignored. For example, let's assume a filter for passing anonymous pages a= nd +another filter for blocking young pages are installed in the order. If a = page +of a region that eligible to apply the scheme's action is an anonymous pag= e, +the scheme's action will be applied to the page regardless of whether it is +young, since it matches with the first filter. On the other hand, if a pa= ge of +the region is a non-anonymous page, the scheme's action will be applied on= ly if +the page is young, since the second filter is also applied. + +Note that DAMOS action is eligible to be applied to any memory that satisf= ies +other conditions if no filter is isntalled. Meanwhile, DAMOS filters work= for +only memory that satisfies ``type`` and ``matching``. It means installing= only +pass filters is same to installing no filter, because pass filters dont' b= lock +memory of type that not specified to pass. For any use case, at least one +block filter should be installed as the last one. =20 For efficient handling of filters, some types of filters are handled by the core layer, while others are handled by operations set. In the latter cas= e, @@ -516,7 +537,7 @@ filter are not counted as the scheme has tried to the r= egion. In contrast, if a memory regions is filtered by an operations set layer-handled filter, it= is counted as the scheme has tried. This difference affects the statistics. =20 -Below types of filters are currently supported. +Below ``type`` of filters are currently supported. =20 - anonymous page - Applied to pages that containing data that not stored in files. --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 076061D357A; Thu, 26 Dec 2024 22:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251308; cv=none; b=b51hJg1zN5VwFGRFgT/iKFu6pe/mu3SsOmqg1Z9W3hX/4AtDJu9CrJAy4ixXTsH0sdapYkeCHE7VF1z8GAeBLXVa9fV6h7FmxzsfE1PGqzRpKjcVKXrRtKlqqoX/Fz0urT1TmSLGEQJD5fhBiw3Ulks78CUJFcHu4bGrwQ0QhgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251308; c=relaxed/simple; bh=juadYvUhIrNs11RvqR4w499ufNXf6y5+YZmNZP0gQvA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S3iNbCFnYKf+bPlbEdn/8Q6wU10kto2/FIMdlMR0RAuuV0pxkYD5j1vI7XqbxNlj8BCz6NRMkPlPsv10OeUtoR60E+PhNPFf/rV/UXNK8QHWcCn4VMTzVWYRCHevtOrvVV3dy3L35ixrXekMmyEPsSwa88nNUHExdEz4KM1hxtI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XPjBLf78; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XPjBLf78" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606DAC4CED7; Thu, 26 Dec 2024 22:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251307; bh=juadYvUhIrNs11RvqR4w499ufNXf6y5+YZmNZP0gQvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XPjBLf782yiUQxV2UcpxQo/O1rKLu/pFbXb6x9/ZcwmcuKgjOG7I6FXRA0xZk4Ybj kKG+IjAweuFkwEF5Z6HZ0LVqUIoLMimFNaifeydwejNdTM8QTXSbic+d+l8J2LzYLI hjudt0QdHdzdDnUebPTTI5M2T1wZvKXQaxgrz1TbyXHRla/A240QKzG9rjG/+u/1xW veiSb2ae+BsAf6V5tJsYWbcZbwioj3pxZWvKLLKPCviv72FYPML2noi9I6ol4jTc52 cZx+4iTwcjn7UxHNRDK0ZzlI+Ke2jTodLo2g0YX8Ux5qoX8hxJtFTtQfjAvBPCv4Fx gfm8JGYr87gnQ== From: SeongJae Park To: Cc: SeongJae Park , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 08/10] Docs/ABI/damon: document DAMOS filter pass sysfs file Date: Thu, 26 Dec 2024 14:14:43 -0800 Message-Id: <20241226221445.78433-9-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update DAMON ABI document for added DAMOS filter 'pass' file. Signed-off-by: SeongJae Park --- Documentation/ABI/testing/sysfs-kernel-mm-damon | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentatio= n/ABI/testing/sysfs-kernel-mm-damon index 8c0acb31638b..688bd27d8602 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -355,10 +355,16 @@ Description: If 'target' is written to the 'type' fil= e, writing to or What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//fi= lters//matching Date: Dec 2022 Contact: SeongJae Park -Description: Writing 'Y' or 'N' to this file sets whether to filter out - pages that do or do not match to the 'type' and 'memcg_path', - respectively. Filter out means the action of the scheme will - not be applied to. +Description: Writing 'Y' or 'N' to this file sets whether the filter is for + the memory of the 'type', or all except the 'type'. + +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//fi= lters//pass +Date: Dec 2024 +Contact: SeongJae Park +Description: Writing 'Y' or 'N' to this file sets whether to allow (pass + through the filter) or deny (be blocked by the filter) applying + the scheme's action to the memory that satisfies the 'type' and + the 'matching' of the directory. =20 What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//st= ats/nr_tried Date: Mar 2022 --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B78E9199FAB; Thu, 26 Dec 2024 22:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251308; cv=none; b=mVbM53+rc5PgH1DoaFXNBwWSbIzU6lI2t2ME4NCENfnpfCxZTUWXQQjRcE+edU20R6ZwLyhXMxuRSpqix42E9GQYLWXJTkFG4qMjku10xiyFSK+R9j2pv3xjSRHOu75+xtMFeEudphIpW8zia1rT9J41FTZvfhw8XzrDjHL/CR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251308; c=relaxed/simple; bh=0f0Lpal72vM2StRK6no1fT4yLv96CM7EUNHKZOxnDlE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=N0Mmtx20Ut4B8xWhdrDPU1TDTP9HDT7AxY8ThdrwGr2LXsYOWu7vuDAyf5S/NCrkIh5sOJPp3vNNOcRcJ4Q6plglWumHXnLlk3ukvYbz64oO9brE07HPGSSzzQH9DXm1w5VPAtKC6QKxazuOegKnmEWtN/ik9LKAf19frG+sP/k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RyBTRG7q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RyBTRG7q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E298C4CEDD; Thu, 26 Dec 2024 22:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251308; bh=0f0Lpal72vM2StRK6no1fT4yLv96CM7EUNHKZOxnDlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RyBTRG7qaa8/dvTMhhcXh0+PZx946PmFR323CgbNSzEerJ1xkQT+X3v3GUZHtdewq S2AeFgRWfgiblLpevzE5ynWM+e4IY9n015Bq1o+edkeNioQ0NwUA1oH7YPV6N0KGpO KsOCJaiY7PMTkiM02GUWGCY5CZlCNq30x8d7Bn9gum2FSYqPKpKO/FKt9iHxKFeMur HvxnFxUIyLfB3XPz9cypDj1V5D6pbTTNlrTH3AH9zvCImIiWjwGuw0UPytZtQ01vQA sy8hHGrqZo0YgsxXZRxkN7GsIWIdOREQpJh+ene0uKuwewpcmmwCCm6Mcrh2PcNByG JatB1vN1zjG/A== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, kernel-team@meta.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 09/10] Docs/admin-guide/mm/damon/usage: omit DAMOS filter details in favor of design doc Date: Thu, 26 Dec 2024 14:14:44 -0800 Message-Id: <20241226221445.78433-10-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" DAMON usage document is describing some details about DAMOS filters, which are also documented on the design doc. Deduplicate the details in favor of the design doc. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 29 ++++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index a891e830c2a1..fa8a5e4199b1 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -417,13 +417,17 @@ Each filter directory contains six files, namely ``ty= pe``, ``matcing``, file, you can write one of five special keywords: ``anon`` for anonymous p= ages, ``memcg`` for specific memory cgroup, ``young`` for young pages, ``addr`` = for specific address range (an open-ended interval), or ``target`` for specific -DAMON monitoring target filtering. In case of the memory cgroup filtering= , you -can specify the memory cgroup of the interest by writing the path of the m= emory -cgroup from the cgroups mount point to ``memcg_path`` file. In case of the -address range filtering, you can specify the start and end address of the = range -to ``addr_start`` and ``addr_end`` files, respectively. For the DAMON -monitoring target filtering, you can specify the index of the target betwe= en -the list of the DAMON context's monitoring targets list to ``target_idx`` = file. +DAMON monitoring target filtering. Meaning of the types are same to the +description on the :ref:`design doc `. + +In case of the memory cgroup filtering, you can specify the memory cgroup = of +the interest by writing the path of the memory cgroup from the cgroups mou= nt +point to ``memcg_path`` file. In case of the address range filtering, you= can +specify the start and end address of the range to ``addr_start`` and +``addr_end`` files, respectively. For the DAMON monitoring target filteri= ng, +you can specify the index of the target between the list of the DAMON cont= ext's +monitoring targets list to ``target_idx`` file. + You can write ``Y`` or ``N`` to ``matching`` file to filter out pages that= does or does not match to the type, respectively. Then, the scheme's action wi= ll not be applied to the pages that specified to be filtered out. @@ -440,14 +444,9 @@ pages of all memory cgroups except ``/having_care_alre= ady``.:: echo /having_care_already > 1/memcg_path echo Y > 1/matching =20 -Note that ``anon`` and ``memcg`` filters are currently supported only when -``paddr`` :ref:`implementation ` is being used. - -Also, memory regions that are filtered out by ``addr`` or ``target`` filte= rs -are not counted as the scheme has tried to those, while regions that filte= red -out by other type filters are counted as the scheme has tried to. The -difference is applied to :ref:`stats ` and -:ref:`tried regions `. +Refer to the :ref:`DAMOS filters design documentation +` for more details including when each of the +filters are supported and differences on stats. =20 .. _sysfs_schemes_stats: =20 --=20 2.39.5 From nobody Mon Feb 9 14:31:26 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 206911A238A; Thu, 26 Dec 2024 22:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251310; cv=none; b=uyDkugCgLjnfijd5q3W4viKouutVITwfXaIUAsIz9fA8epx00cPoIAWh/gCUOMeruysaT9clYU8a0DWMiBNKjMoY6gLY5BE1I2s/FBM9C4IB0o6CqR30Lq7F6LRwHGpOBJ84SpQo7cWgf6OvDtu/9whZQySV8xLqR5zk34Ur9o4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735251310; c=relaxed/simple; bh=HT0LgniPNFcsw7wjoUpvnZv1QsdPFkRx75obGWvCxP0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CrqXN6yvNGRu/eEoG4MIhPI2Kkm/SeszNyWCBSKhFSdKD050EYT17KnBpO5G6dY99lB+Rwd+swUaLwqPhOYYfTtWWKKIBuGwYBpFAXRFRLBcWiD6UcFzGol/qWc1khZYn3HtjojM5tFdZm0nqS4oKQZ52YNMb9gh2wlM7elcbPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FiFtleYH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FiFtleYH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D459C4CED7; Thu, 26 Dec 2024 22:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251309; bh=HT0LgniPNFcsw7wjoUpvnZv1QsdPFkRx75obGWvCxP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FiFtleYHZx2N3jjzQK6mvKWSmXakMJYqF2WgASexsinNgIeXFu2I9zmBYgi+WTcXt wA2oNmJZcnpDU3HMGTFzs+uoOqb8jYVn8EhVDR6qbFrwx5fpRghRjdVB5eEgVj0I0J M5MMPngoMLlPMnqUPC7V45dAI0sILUxI494Nt3IXdoOhU/XxTCtjrAGACnscAtkao7 nc7cMXTqRdHPB+neSgZ31SVYlSeSshFPdgvtC27yKlkQxs1L5lZTodsP+kDE6sM/iU RnUXRL2D8tLLdauASaT+6FLS9RGFVj/y6cvWKx9spf8PJ7VP4rJ5tOYVVzPMFvH2Hd o4ltyfydy4XlA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, kernel-team@meta.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH 10/10] Docs/admin-guide/mm/damon/usage: document DAMOS filter 'pass' sysfs file Date: Thu, 26 Dec 2024 14:14:45 -0800 Message-Id: <20241226221445.78433-11-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update DAMON usage document for the newly added 'pass' sysfs file for DAMOS filters. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 34 ++++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index fa8a5e4199b1..ab343d6ac771 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -89,7 +89,7 @@ comma (","). \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd= \ufffd \ufffd\ufffd\ufffd 0/target_metric,target_value,current_value \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd :ref:`waterm= arks `/metric,interval_us,high,mid,low \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd :ref:`filter= s `/nr_filters - \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd= \ufffd 0/type,matching,memcg_id + \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd= \ufffd 0/type,matching,memcg_id,pass \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd :ref:`stats = `/nr_tried,sz_tried,nr_applied,sz_applied,sz_ops_filte= r_passed,qt_exceeds \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd :ref:`tried_= regions `/total_bytes \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\= ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd\ufffd \ufffd\ufffd= \ufffd 0/start,end,nr_accesses,age,sz_filter_passed @@ -412,13 +412,14 @@ number (``N``) to the file creates the number of chil= d directories named ``0`` to ``N-1``. Each directory represents each filter. The filters are evalu= ated in the numeric order. =20 -Each filter directory contains six files, namely ``type``, ``matcing``, -``memcg_path``, ``addr_start``, ``addr_end``, and ``target_idx``. To ``ty= pe`` -file, you can write one of five special keywords: ``anon`` for anonymous p= ages, -``memcg`` for specific memory cgroup, ``young`` for young pages, ``addr`` = for -specific address range (an open-ended interval), or ``target`` for specific -DAMON monitoring target filtering. Meaning of the types are same to the -description on the :ref:`design doc `. +Each filter directory contains seven files, namely ``type``, ``matcing``, +``pass``, ``memcg_path``, ``addr_start``, ``addr_end``, and ``target_idx``= . To +``type`` file, you can write one of five special keywords: ``anon`` for +anonymous pages, ``memcg`` for specific memory cgroup, ``young`` for young +pages, ``addr`` for specific address range (an open-ended interval), or +``target`` for specific DAMON monitoring target filtering. Meaning of the +types are same to the description on the :ref:`design doc +`. =20 In case of the memory cgroup filtering, you can specify the memory cgroup = of the interest by writing the path of the memory cgroup from the cgroups mou= nt @@ -428,25 +429,30 @@ specify the start and end address of the range to ``a= ddr_start`` and you can specify the index of the target between the list of the DAMON cont= ext's monitoring targets list to ``target_idx`` file. =20 -You can write ``Y`` or ``N`` to ``matching`` file to filter out pages that= does -or does not match to the type, respectively. Then, the scheme's action wi= ll -not be applied to the pages that specified to be filtered out. +You can write ``Y`` or ``N`` to ``matching`` file to specify whether the f= ilter +is for memory that matches the ``type``. You can write ``Y`` or ``N`` to +``pass`` file to specify should this filter let the memory that satisfies = the +``type`` and ``matching`` pass though (allow) or be blocked by (reject) the +filter. Allowing means the scheme's action will be applied to the memory. =20 For example, below restricts a DAMOS action to be applied to only non-anon= ymous pages of all memory cgroups except ``/having_care_already``.:: =20 # echo 2 > nr_filters - # # filter out anonymous pages + # # block anonymous pages echo anon > 0/type echo Y > 0/matching + echo N > 0/pass # # further filter out all cgroups except one at '/having_care_already' echo memcg > 1/type echo /having_care_already > 1/memcg_path echo Y > 1/matching + echo N > 1/pass =20 Refer to the :ref:`DAMOS filters design documentation -` for more details including when each of the -filters are supported and differences on stats. +` for more details including how multiple filt= ers +of different ``pass`` works, when each of the filters are supported, and +differences on stats. =20 .. _sysfs_schemes_stats: =20 --=20 2.39.5