From patchwork Thu Feb 27 01:57:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13993531 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 E5445C19776 for ; Thu, 27 Feb 2025 01:58:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 976C8280008; Wed, 26 Feb 2025 20:58:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 90665280003; Wed, 26 Feb 2025 20:58:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72853280008; Wed, 26 Feb 2025 20:58:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4E10C280003 for ; Wed, 26 Feb 2025 20:58:13 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 19A83161418 for ; Thu, 27 Feb 2025 01:58:13 +0000 (UTC) X-FDA: 83164064466.21.4A6C1DB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 78FCE100008 for ; Thu, 27 Feb 2025 01:58:11 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YFoEwWOQ; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf05.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=1740621491; a=rsa-sha256; cv=none; b=xSKCzcTBUYhRFIj8rQX59gZ1NEbIkJz4jWL243b3eN2soEKW/EL67sUJJAWFnp1LPWP2Wr tRgz6FT5HJ0mzcmkTEyCAt82tQtBcZEz13WBId3WIa6HIGfUx1vFUQ3U+OnG78QNJ5Gxn5 P81Vrjk24QBP5IG6DV/AY/pjGkcP78A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1740621491; 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=q9SY97T1RHhI389DUjSiloVpEHuSj33+4wIhpTHxYO8=; b=PRvk/5ORVyM8mCiLMxSckZHVzlL/n9WvnPxpSWKZVdWrP7ZegntHpBte7/il63E6BrZmSA 31fXXmejoQoZdCkZhoXa2gr8Ah71LmbCH3CUesajZI4Y/tLIuDOSfebDysQN+yHet+tLit 4sbRUOZ291tKOKbmfqpagH/s0FuHt70= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YFoEwWOQ; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5DA805C7644; Thu, 27 Feb 2025 01:57:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E04EEC4CEE8; Thu, 27 Feb 2025 01:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740621491; bh=tQqSkhuPbb1T5x6cMu4V0N9ePh3tWbcGixS02DkoMHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YFoEwWOQMtYL3tiHZY1Klb9D+0FI6oiHIg3qJP9gQ78IuyJzv7mC4Z5XiRo+eS7nE +X9R8bAUwlgr0l6XZKdzqTkFzZMhmbd/P/Eha3YGAjfIylzddDwrO7+ZyoLTLWifu5 Tu2FKElANpXcF/pdBlIchfNiSWjeMm3yJ1J+d1+450u2LbP2A3i/gN+uwdA4m690lK fMyX5xpGp9iB9GtaAZHtik2A0zQ/Jck7wC2VdhVNvpV4Q2movxtcZQMD9ZdPLGG+TZ rshdBICJI0Y7/Iu2K60V4q/eKP4SucGbQPACyRyshuj2ZwIBdhYJT7S5rtRc7HD2oa 4SoI53OREUdiw== 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 v2 9/9] Docs/mm/damon/design: update for changed filter-default behavior Date: Wed, 26 Feb 2025 17:57:54 -0800 Message-Id: <20250227015754.38789-10-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250227015754.38789-1-sj@kernel.org> References: <20250227015754.38789-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 78FCE100008 X-Rspamd-Server: rspam08 X-Rspam-User: X-Stat-Signature: swa1rgkh3645twmznpsti18ayeuknude X-HE-Tag: 1740621491-303225 X-HE-Meta: U2FsdGVkX1/KqWqyep/xpIeMMcdal3q7DKhD9U9MzQI3kLiP+VvoZQHWwbcykLCb2hJQCxIXqsTPlYmrE8Gb89ymTPuAQbPTbUc88cmfTa3oJJk8xDBxIofiMetCdTu4n8r+PDR/HnvOndj2LWQEyzpU5odMOFx9R/2nd4ZG7aNOhgZSOhjgCd4+4UZDgi4aS3NP3IeWhQFO8IiANjcjqQc08JIwjAL+qoNtNr1PdcL29h1Cjd47lr8J7rb90VQXhlE8LqMhVXzMazlp9TzwCFdSy0xzGVVJVcYLqGRfws34vCPPiIJSCLuQ/rmah3eD+JWAT26EauPgNlyG0DwDosqRe0erW3dqebVKybCW3wY9Sh/VqKE4KGQYHYjj5SvNA/PKtilO6m8cPpa0HflMAdWgSBeh3xCqrgz8ldjF9+ynNE6vbah+aUElfisjb7BdjAvnF957qQK6jGevlv2AwUBFGNLatXVI1K/ffpEmyh3HsajVADPW16zLUd7b/NCzNsrzZAiGMsdSRLgRmMsz9fVjG1ftjzXhi8AZo7f4RjyGetAj2CNpjihXsGbjy//yzdIdpTmafdeuxDzZ42cqZEjHtxCtkL+wddKtXbaehoYofTx49YYMvH6ik+iKXlfmPA682s3uJ1N9m5uTPRv75CIhuVxutaxfNVFw9ubmdNU+nr5QSEQwjQ+FMKRNukryjmFP2ZEhJ6nNQ3JbHKG6PRFrPnvIKAfkwnCilVIvziMw8pmwS8YbRqNrc/C1JdhaCZzfVco5kHVn3ve3mfo0rnEGVDDrdE/0O82XEP8UHSXYra17vZPtGbjsE8LfWGNekr84J121AVB+gZ6pyA9fROCJCTJOEJh9apf7NvSZcPUaMYVUND1pauCKpdtsGreI04SPU/Wb8hNZrDk5F5UcmNJsuPn7k0QeUkzfnJ3y4/4Z10uu/URp+Jzyk3MLzVZUkJEnEOW5p5RdKkUjFb0 0Eg5q3We xs8goqOBzh4U9hhCd4fV3swvSmeevXA9k6yS214M75G6HS+VHSlfDqybW13/7fVTJGYFyp+uYApCqpdFrRAeaNhc9KivfoEtfeIRtlmiReGd0y8k0Gtz5cRbPE1bLdbtO3VbnGUmiSWxOL4jHF0ZHhzJpn+9wHAb1xvE/glGsCX8fNsze6X+SdETiRE4OrvREwQTkX7C4Xpvilq6uEWy0Ecuk9o5k1LI84RB8aJEM7ByGLLI= 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: Update the design documentation for changed DAMOS filters default allowance behaviors. 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