Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1958175lqm; Fri, 3 May 2024 11:05:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzQlyWxuZqRsN2kwVVepGDw3tv9KLAqmEvKKuOyFIj23ZA2EQ2xo0zmvBfdmWK82F0odLtddUOlgSFwbSLXimuAe5EAO9le5kqXfSIOg== X-Google-Smtp-Source: AGHT+IHB96EiiJxSkslbJFOt4iqC6FJ+Ec01a9GBT3/acbfFZtxrL5bNNABESZJLMzl69DhBUQdS X-Received: by 2002:a05:622a:40e:b0:43a:f5db:88b8 with SMTP id n14-20020a05622a040e00b0043af5db88b8mr6117076qtx.24.1714759516830; Fri, 03 May 2024 11:05:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714759516; cv=pass; d=google.com; s=arc-20160816; b=Sf9BH4RhjCADzTVkRbRpPUxkiYAmOOIHUnoCQwpZYqffyNA2TzcjSF15e3Dt0sYmwJ KXZrG55u2vqGLf252BWdmlFtvCMwJckJjr3YLsszl00JQ5N7FPZ+TwMTp0VJJF/yNGPt 7zZPftoDDEkigkEg3gXomcRddSVb609DIdXOeOwM38UGLS88C4FDUaAPK5/Im4IzTL2+ mVIioED2wHGhcuSu/wceOoCUfjd7JauFq5UbRfVndr7E5gktTbRjakoeKOv460o98ikE va22cVa1O26bYNSzDCTTfK5tIGA6J0VYc+0vko/Sbahb80GKRLLa6O6CtmLlcqLPrBV8 D3nw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2WMwDYK3MCG3V0L+acXnRecVHzPMF83oQhOGsvA5Rck=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=Ix26181TRf7ypBamaoQsfCr/E9mKgt6eXPdKYCLo1mxkvAwEfGBGDvSqOiMKHKio5h e+M6J7cI8PgDglzEKGF9YsSlJPbRQDf9KFykPkFuMpXgHjc7hD2IYTq5M/YmuVALql7Q z2UjUW07qwb8vjWlt+p6C1udPo6a+nsZxrRaddOm8KZvaTehr2hpqlFSdv+kBpJiMR/M Qp56fUvjaqPq9Vo6EBE6mu+5ns2aAW9b+jE5xPutnkR5ynuGNRogQWJvNf2SMPp/QIQU CFYoGM+RwOXyXaMtmONU4cKgD8v06vKIwmr/gRMP4jAiUXhmDgyPcOIT0y9QLOw/HGk0 IhQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J7w9nGDb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168003-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168003-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j5-20020ac85f85000000b0043aea4140e3si3852611qta.391.2024.05.03.11.05.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168003-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J7w9nGDb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168003-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168003-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8E5B81C2303A for ; Fri, 3 May 2024 18:05:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CA88158DD1; Fri, 3 May 2024 18:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J7w9nGDb" 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 4C48A158DA3; Fri, 3 May 2024 18:03:28 +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=1714759408; cv=none; b=a5pjIjFEwWsbsWmnCTraDGXnH74oW0u1Dh4678G+OC62rM+R23wAQUS7voU/aEwz4ih5FKSYZUko/ePt2/18OlfJYsjl0+vXcpCCro4QPwedZYMp9karWdQN0vux7EJHLnktChPOZNuXcdaKCWJRx9aS4XQ0IWyWRG3XpLnkkxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714759408; c=relaxed/simple; bh=Kr16aWsUWHmzs0T3rMgu4QN0Xzu0Ms/e3QljzklXCpY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BdNY3KGDm+qn3e0Oc5ejDQBdTIly0CW61MsN2SLhleRZOYenopmGLKNhXZkQFyn4IVrIBUIoaAxQHN9fNbM8cv9hGDvLaLgDzB4hLaZZkxZ7LY6u9asKObTnOSSY0PR4zlnSFTdg6Z0xYeA5aFTetbrflfWZfe+n+oGcGVzPHEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J7w9nGDb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D0AAC4AF19; Fri, 3 May 2024 18:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714759407; bh=Kr16aWsUWHmzs0T3rMgu4QN0Xzu0Ms/e3QljzklXCpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J7w9nGDbaTbVNvv//EAR/1njh5p6lE60qGH7jBDMIDT21if4xM2hV4mOvqwVQspqI WsDHWJ4RMZ8lILUhRxAXa6KZBwXZB1jht2lDxwbn4FJ5Kgif8TlZfFBnJmtpVVXSL+ JL6RPq9/hqZHjGgDIoPUxqiB9JvYWxwqA90sLjcXJi/KZwvqOB58k9SKgWIX1hHMg9 5SgjtB0adzb/2Ubt6JS3QO2DkwLz2HxGJSUmuV8u/JnZM9WSZTGOqmAxl241tHBo7G q8VfeLPNsrd76mwdWktnd/q1Dv9RiaQPQJpZxMaaWkEo45v3Y3l3BUClaqInZxJaif 70PRjztQYcfxA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/10] Docs/mm/damon/design: use a list for supported filters Date: Fri, 3 May 2024 11:03:16 -0700 Message-Id: <20240503180318.72798-9-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240503180318.72798-1-sj@kernel.org> References: <20240503180318.72798-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: 8bit Filters section is listing currently supported filter types in a normal paragraph. Since the number of types are higher than four, it is not easy to read for only specific types. Use a list for easier finding of specific types. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 46 +++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index f2baf617184d..1873755358af 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -461,26 +461,32 @@ number of filters for each scheme. Each filter specifies the type of target memory, and whether it should exclude the memory of the type (filter-out), or all except the memory of the type (filter-in). -Currently, anonymous page, memory cgroup, young page, address range, and DAMON -monitoring target type filters are supported by the feature. Some filter -target types require additional arguments. The memory cgroup filter type asks -users to specify the file path of the memory cgroup for the filter. The -address range type asks the start and end addresses of the range. The DAMON -monitoring target type asks the index of the target from the context's -monitoring targets list. Hence, users can apply specific schemes to only -anonymous pages, non-anonymous pages, pages of specific cgroups, all pages -excluding those of specific cgroups, pages that not accessed after the last -access check from the scheme, pages that accessed after the last access check -from the scheme, pages in specific address range, pages in specific DAMON -monitoring targets, and any combination of those. - -To handle filters efficiently, the address range and DAMON monitoring target -type filters are handled by the core layer, while others are handled by -operations set. If a memory region is filtered by a core layer-handled filter, -it is not counted as the scheme has tried to the region. In contrast, if a -memory regions is filtered by an operations set layer-handled filter, it is -counted as the scheme has tried. The difference in accounting leads to changes -in the statistics. +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 case, +hence, support of the filter types depends on the DAMON operations set. In +case of the core layer-handled filters, the memory regions that excluded by the +filter are not counted as the scheme has tried to the region. 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. + +Below types of filters are currently supported. + +- anonymous page + - Applied to pages that containing data that not stored in files. + - Handled by operations set layer. Supported by only ``paddr`` set. +- memory cgroup + - Applied to pages that belonging to a given cgroup. + - Handled by operations set layer. Supported by only ``paddr`` set. +- young page + - Applied to pages that are accessed after the last access check from the + scheme. + - Handled by operations set layer. Supported by only ``paddr`` set. +- address range + - Applied to pages that belonging to a given address range. + - Handled by the core logic. +- DAMON monitoring target + - Applied to pages that belonging to a given DAMON monitoring target. + - Handled by the core logic. Application Programming Interface -- 2.39.2