From patchwork Thu Feb 20 19:35:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13984442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3276C021B1 for ; Thu, 20 Feb 2025 19:35:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CED6280309; Thu, 20 Feb 2025 14:35:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 55A342802F3; Thu, 20 Feb 2025 14:35:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AB73280309; Thu, 20 Feb 2025 14:35:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1688D2802F3 for ; Thu, 20 Feb 2025 14:35:27 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B6DB7C2A48 for ; Thu, 20 Feb 2025 19:35:26 +0000 (UTC) X-FDA: 83141327052.30.0FECC21 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 1D71F160017 for ; Thu, 20 Feb 2025 19:35:25 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UZMn6WIf; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1740080125; a=rsa-sha256; cv=none; b=mT/FplYXQN30T9f1x9WCdXNPqZj9O77LALVLrwp5408Q9faKXXbDc6KKdETPfuEPl4XDOR X62Ejjv3spJGB+Slj4/pSzI8/OuHMs/77N+lLgYa0VwVW30BMSzHud1VUxmSg5ZMlhhAgu 7h39z+Wbf5sP8YEarDW5LFUnTFxGKs0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UZMn6WIf; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740080125; 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:in-reply-to:references:references:dkim-signature; bh=TvNauERo0FXz/HmyZx87QAYdsqLNt6bw/HkXNk6gxj4=; b=YrCaGHb40Mqz5YMJk1rHx+fKE1n1RfRoScK2Ji6br0XaQRGaZ1EU9PNBIKbBoi73LnDkcw qzi3qPHhBL4OOF1qSq4feht+j03xyRVPa4rs2gPlIN758mT1617LI5LZsgZZYIA/j3/Rz+ caPpL+ztXS7Yq32hKCqi3RLFV//8wTA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B5B105C5A88; Thu, 20 Feb 2025 19:34:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C770C4CEE3; Thu, 20 Feb 2025 19:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740080124; bh=lQdCqJbuwqzMBVYn0ePijMi74LmE9XAyvz+DAnJaquU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UZMn6WIfr5nauFmmgrz27Rv8ZIKr5SlSx8s7NX/PPfmgJddMM8/RNUto4mOB1ikpp ZjF7ftkm3gAQmuKQB1sy7Tlgv6ly1qucgN/eFu41DhJqEsZhOMRblCa4pwW9YOGMem S//I3/DSBbf7K7M7Hmc9g/y9knPfmydm8XSjjMqeshFfNIbCZWTZNSvwK1HPqAxTMI a98o7ltCQzyGP3Evev31R9bhsZOIBEyxKEINraDRcRauklbw+mXrX48lR8pUNmJMUl DcHKTvegIS6NghmMM5//LAkaslX+buIwZAzNhOp/wbYLfE5EBbzF6PkIqJS0JMuB5l LQ5YLrVkvdPUQ== 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 9/9] Docs/mm/damon/design: update for changed filter-default behavior Date: Thu, 20 Feb 2025 11:35:09 -0800 Message-Id: <20250220193509.36379-10-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250220193509.36379-1-sj@kernel.org> References: <20250220193509.36379-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 1D71F160017 X-Stat-Signature: mdhxbf6kzb8uynhp5d9xj49bnj5yy85d X-Rspam-User: X-HE-Tag: 1740080124-756008 X-HE-Meta: U2FsdGVkX18NK/kfIN3XhQZ0midH1F+stKTxUA7sZSlfEcKOZfB5HSnHwbJ/MKs6vIaO4VRts1ewHWq9UTYF3ZPXclw9cgG53dty295p2bftBDTJ1MDwups6X6YGJqITWtzf0A6L1BE2lNO6nqOFU8+Ga0lR9vZneBHNspJT91oti2lA+Gc6bUSmIIIlFMxVGS07RaVkyyW5vqZqh5lUwn13mon7TAq1EuI9KtjhG/ikc7kq7IBnqXwQOlyKuu5crR3A2IQJp+CqFVQLgYKFuZrhTPOJ3OLp82c23H9vMQeUJgSQoxuX1YwIHip395153kmCwIqD0WkG4dHV5f3wT/qd0XSyuMXDNAUOb1w8MGX5K7T7nwV4Dlp5rCWesBLS4XM9QdpdUtDPd96UEXnhFQ5w7eT9UDA1RCFEVHQoD/rK5/CfXuysUovjGza3om3DIl3ryPMNVBScOIKIDdNkWZoveRu6XFd12OcQ4+CuzkgtbhxeVEKRiQXkSBm8AM6+7LYOe6OMZ+PaErwe2dyDF37R5UGgCPuC8PXZ/xp6zqS0AoycmKQED95GRO5CITQNinGRmq3gmNOZAtDJu1L2m/eLknFKoUs4s1fEJpZ5mc7WXHmrSjNfFVLghqMGof7pNiL9m75tDxNrCjc8vYQUXJxcZhYBU1dS2gbMKv7IzRJnrKpIa8SSoOKZ+ZNRlDsVMLvdjIdtdMG7j+9GdqdzwZ/loOXIZPn/G0mEnJ9JtA0SIKxs0HwosO3YD3I+8rs2S8iFHeYVmox2caTCAfX/uPs0bhUH4d5eMZoX3fMEGw6RFUmMh3jE6OWbyTV0eoz251p2RRFhZxytBu4iYrbVTx2L9fHW4qa+uUa6nLzVB7OPhGcDWkr9IJCNuzBw2rmvYjj3mVaEQvXYld7AYsr7/cRHihXeaHGwTZqTo7BNYDf1idhGuM+Yta4OgZlbEGV3zrAfnH9/bzvD9Lo6Hxd yCPTHGnx u0qxzF8K5EzmHL5NQsAb+DJF6Axo+oOmDr9deRM8QnyZ8ThIbVtkL8V9owqHW7D+QHMl2KlwzLrfOcl2BPrgfawlGTcDNFTf9It9Y0L6HhXNZGXp2szIU0K8mukknRs51iI7yoEHDKqqPnwAZJ8kopsD1Rfq+j/Wru8JjgcqpRFUyWjlSBzDFlmv1YfuqjrWeXq8eziAVsT9qzJaaBKL389C5klXyUG5GrX2PFyGIKqsKQ/A= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: DAMOS filters evaluation stages' default behaviors were always allowing before. But the previous commits have changed the behavior to be decided by installed filters. Update the documentation to clearly describe it. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 5af991551a86..ffea744e4889 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -581,9 +581,10 @@ When multiple filters are installed, the group of filters that handled by the core layer are evaluated first. After that, the group of filters that handled by the operations layer are evaluated. Filters in each of the groups are evaluated in the installed order. If a part of memory is matched to one of the -filter, next filters are ignored. If the memory passes through the filters +filter, next filters are ignored. If the part passes through the filters evaluation stage because it is not matched to any of the filters, applying the -scheme's action to it is allowed, same to the behavior when no filter exists. +scheme's action to it depends on the last filter's allowance type. If the last +filter was for allowing, the part of memory will be rejected, and vice versa. For example, let's assume 1) a filter for allowing anonymous pages and 2) another filter for rejecting young pages are installed in the order. If a page @@ -595,11 +596,6 @@ second reject-filter blocks it. If the page is neither anonymous nor young, the page will pass through the filters evaluation stage since there is no matching filter, and the action will be applied to the page. -Note that the action can equally be applied to memory that either explicitly -filter-allowed or filters evaluation stage passed. It means that installing -allow-filters at the end of the list makes no practical change but only -filters-checking overhead. - Below ``type`` of filters are currently supported. - Core layer handled