From patchwork Fri May 3 18:03:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13653186 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 76E09C4345F for ; Fri, 3 May 2024 18:03:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C8E3F6B009B; Fri, 3 May 2024 14:03:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF0B66B009C; Fri, 3 May 2024 14:03:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABA046B009D; Fri, 3 May 2024 14:03:30 -0400 (EDT) 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 830E66B009B for ; Fri, 3 May 2024 14:03:30 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 3EE82A11BA for ; Fri, 3 May 2024 18:03:30 +0000 (UTC) X-FDA: 82077856980.19.C9DD7C9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 8DEAA4000D for ; Fri, 3 May 2024 18:03:28 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=J7w9nGDb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.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=1714759408; 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=2WMwDYK3MCG3V0L+acXnRecVHzPMF83oQhOGsvA5Rck=; b=7q4tGX5HG5k4JbgnYdlAgLhn45Ztb2RkddBTSDxHRnLrYcdb41le1zbxYnHx6h6ouNY6by ns2Zta9AMzOezmX17q4zdKxfd4ckpuITy7Engf8vp/7npDrymwhNzHnxRGascPMoSaDmMV hBXHp6YaRR9j0y93VeRco5rAQ0vNGuo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714759408; a=rsa-sha256; cv=none; b=RsPDH7oSOp4jpX1H5EiDUcEeivyMfn3Hb57r5LElU7FHLhFuKcalgbwLQUrIgaMSv7ue81 ZMAZqAGzsf1GqyVQQACHgYe9wFdRv+UfvGmvLP4E9KZpHamSD194cE7Y4rdfCdpj/8H26B 07L8SkPgH554aNGx10sRCLaF0fgxhOQ= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=J7w9nGDb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.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 2693461E1D; Fri, 3 May 2024 18:03:28 +0000 (UTC) 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> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 8DEAA4000D X-Stat-Signature: kyad67xgefw135dufum5jqqp9i67m7hp X-Rspam-User: X-HE-Tag: 1714759408-49888 X-HE-Meta: U2FsdGVkX18pNguSVi3XurPQjVuRSwCqxLVCR5I5gmXj0f5/7Yh6EKsv1AUj8hEy2GkmQ+UDQBOYhwdDyhNUEdBvOZ7UP7/syn+dDvOPDxcbSAI2jDtxLhqELX6AdA3vwuBg32jGJ7G0a2fSb9ztl8hl+ERNwu6JsheJlfwCYi4uJ8ACk0R/D6eDMSWQmOut/YDDYX7D4ld9IMfJ0gTwF8H3JjRKUlBtg9OF7/b1TalzhmtxiOKNd63TVxt3JrRAqTzWS/0yKTpGAI9Po3MRogeuIco8HkX549Pkxp82mHo+Baj0rzTOI+YFC27HrEEjDTJHBk5cJt3npMBVYaohmIxsYfKJd/nHMKzVnCGDXRbQcsqkB8IRK11DNu3HvibrvEfYeNW1W+HVDM3Mrnms9Fy3dd5gHSWBAC0jRYFEYrhwyx4d6Aw42uo0GhHIoe0jYYvdIHLoVXx4RXFAD0flbvxbBFBr4ZHGsSG5JY/AnGxTndzmihD6gbbB+wL2OSokslTRTa3QIkE3QM5uv9HVj3jBI8iywdK+McNzbEo0qgavOQ47sywKKiQ/h4kkCt0uPQifSlDdB18dfUDuiCbvzqNtYowmPymzgomno0Xs1xGIAbZQ8swQdtHp68Z/hPGj4qnO6gXr/1Y4AOu6lu30UBFhO0OG7tTyyyLV3iSGSNSalIX1ka4acS3YqFOBBjTmnZrwaO23WbtiOjDtleOSVrjcQ5KNLm5ptPC9lpg7xVt/V5KCA/LWgUcu69k5OQAiJtyMzaLzdfTJwWScjwbvVuaDYqZ6/PkK6xvm+Zk1nZJ0IO5Mt1aNOKaqSPhFdq64K/T1Kvj1NkmXqsnsGYm+zQX7udiHhsF+QDlHiMK6SlJUDw8yQSqmmqlo3RhqSq6W0Pu8WeWSdbT5r7X4FBTO4FJpEQq56XFkkzF70XgVVJsVD1XSelADI7rpUAJleKBU6cmAEWliLK4kI/4JZ9e AJm4W2v/ 1Hf115J1O+dbrgr6QON61ky2Z4OaOrXCstOmtR7oz1vrOIHtAJwwOvfHq77R+v9TeXk/CNB852Em+VJGzfQZ2QvNlZ++d0gMIb0wtQ+ViXW8y9X81NxkbUf085Ai6wuMPrew3nrWKmTCAmN8LDsf01IOLWQ6N0N5Yz11u/LdOJmywMtwACsDBzXdBzIa4TbC21yvGFCrAsiDY0fy2qUSzEVvb8ya8QMH8LTTYCeEhWkJMwA4EyApeAMweaw== 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: 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