From patchwork Tue Feb 18 22:37:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13980986 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 EA446C021AD for ; Tue, 18 Feb 2025 22:37:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4716D2801AB; Tue, 18 Feb 2025 17:37:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AC052801A7; Tue, 18 Feb 2025 17:37:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13C422801AB; Tue, 18 Feb 2025 17:37:21 -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 E278C2801A7 for ; Tue, 18 Feb 2025 17:37:20 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A27F0160668 for ; Tue, 18 Feb 2025 22:37:20 +0000 (UTC) X-FDA: 83134527840.16.A471197 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id EB7DB1C000B for ; Tue, 18 Feb 2025 22:37:18 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QuI8Tq0b; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739918239; a=rsa-sha256; cv=none; b=MFNMSRnLRbsTS5Hd5VpJvtNoukIfTBl/aomWDs6bEryLxkn1PTDz4rEC0Olukt2xy8Ngel iuuzkWg1KnWQbQr6ICf/nfDqc6e0ebh2dn4LodY/l+NXquaYQnR8GG3JrmY/CwLdWqJjN/ oTylh6nXYnru3HAXPC2RL8uztYJbtzY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=QuI8Tq0b; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739918239; 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=gQPCcIMAVzN6csn9KRl4aX+Hhi/ZR9j+gNAv60jWMjA=; b=ykoLczZbxVqNnbTWcGuI88FMdgF3zUeAC/VX1w5Rvtwivc1cIUWwN1FI/KUa9sHvxe3xAG uxeNsvtWLQUva6cnx2iaipTgWnVMJzS1TqeBGfMZfU0QXfQUNST389fDYTa5xSHutWMT6D MZjvkvVhD2hvMVbsxaEXxYTaq1tjI7Y= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 057BE5C62EE; Tue, 18 Feb 2025 22:36:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB00BC4CEE2; Tue, 18 Feb 2025 22:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739918238; bh=OOoII5/zyMHQ8WDLAouq/qJ5GMbnfrXAVmpEUBHSZpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QuI8Tq0ba4foWWD4lvXl4DYdj4Krxz2z/eD4csGR4OWL6PUQWFY5sHuYZM1mu8OAZ uVtiaEI4a81O91DCCHk24hMhtS5SwGzxHgfkMAKa1PkPkCPjeajTIVUuQ1BfkJdx4f gCpm3Lv3Zd1Ma2xHWptxpTpftBGLzJbT+SW7AGXoKTgyxr9uAm0rmzv4KXAToX6LMN OX2CLPygyF01mp3R/MAIxD83zI3dCeVG6vGvKPgWUpn15+2IuBk9vkwtmmxBhA5TiW rEj6XaSC5JH1+xpegU2aIofXYTsQyRkCvNXLRTtsqg0VPzQVS0AHzdQE4zrFXzeHc7 0UgHS6oLynQCQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , 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: [PATCH 3/5] Docs/damon: move DAMOS filter type names and meaning to design doc Date: Tue, 18 Feb 2025 14:37:06 -0800 Message-Id: <20250218223708.53437-4-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250218223708.53437-1-sj@kernel.org> References: <20250218223708.53437-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EB7DB1C000B X-Stat-Signature: p7kwcujjqcaok9rsaji7pt5mstz8fybb X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1739918238-603105 X-HE-Meta: U2FsdGVkX1+Z9wnYvsKeQch6VQOTbKFU1vGzzDgtRPT2dJUNOflBnb+MQT4ZmwDZNT68juHuBtIfAG36vrnn09EFI89R9Oh2/O37CcOc1sbSSWJpz+/DuL7oUnTrtD8pJKzdfsRle+PJeXclvg0H139njQTh8MtXOUqsO6RzE+UvAq5iN97oXYRHJM8XGLEuHDe8VD7UTTc7JpOBakIwQZR55GqtZnvjK7abtNKrMXqQl46Rt4beJwaUaHJww3xu7zVHrWJ76AEJxczydFulWbuviqoxNI52JjlfFPtP0U4Ge+kTQDR1KkJD97y969FRSoYqG82x8awmcDWSMqcn2e2nEpASo5qdypq+nkKd4zTty88YsKBT6TdKBmhX9E9RKgkRbVzPWf7aoK7bp8sjnzvdTokxy6/N2aeVSHC9iQH8EeR0qyqD9Ene8WGDIsNBaeA0ZRQnp1kIJUWfhPTJRnbWM5SKnMf1sYg3nIKJBfaSME3eTEElrnDSTgX23cAavGsG/gDEH6egtnbtO7LnL/WmaMXwB7bt5AsPfyAwHUOoUd+7vqvLTEbKxBl/UupbgVSLNVIjwaJIVLrIM821jYNR4nG56fqpUF+pbZDgAMPMe6xLjUFgmcRIOjzpJykJCJem/zD+3Dq6CXtTlS8IJMShR93e4TeEJpRlQid8bVPaVSWUqKd6AE/MYAdFl8/bFH4+dKCIl3ifDeWjab0oiSw3qmbkRXh6HEKMdstIInwXZtSM8RG7PMuejxvvcQSpWa+VlU+/3jjEk5ZYwbVCyKhC3fMa6+YklqH2t10U6aNqy8XkCoyqBwL8+BMJjE/yFjt1nJWmFrg3RoRrbajIucM8Lsb17Zx2IKhqgJOHzs2v431ggDLbP/PjJ6lymxKPlf6G22mwWS6I85cAY66eqzxjOKxy3WCd6UqQaJ7rXXtCtzZQ7xW0WJF5oSUSAVD/u1ltpqgbDOBAFPtA8IP oyELGl+3 5Ad6I2rV+TfZ+ENZ2gqB+uEEPipqQ9So33ScoEFA07sdNsZr514irtRWsu1H3M4A7ceEMLu4zdk9aYdfqw2x4p/V60C05dP6/mfPzKJX0qUZO2JYWvpG9180XOuBmYIUuPRU5btFOnrkVWAuygWlKJfx+/R5JRPHrKvbnN9Ni1GBjO8KK6wuqGlGXyxXqJdAx8oXJkuIclw0PmZd9TbrP/cvwQXJpIFuj4sQ4r2ax5iFwfuA= 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: DAMON sysfs usage doc is describing DAMOS filter type names and their meanings in short. The design doc is providing the short meaning and detailed descriptions, too. This is unnecessary duplicates and confuses where to document new DAMOS filter types and features. Move the details from usage to design doc. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 28 +++++++++----------- Documentation/mm/damon/design.rst | 12 ++++----- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 51af66c208c5..dc37bba96273 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -408,21 +408,19 @@ in the numeric order. Each filter directory contains nine files, namely ``type``, ``matching``, ``allow``, ``memcg_path``, ``addr_start``, ``addr_end``, ``min``, ``max`` -and ``target_idx``. To ``type`` file, you can write one of six special -keywords: ``anon`` for anonymous pages, ``memcg`` for specific memory cgroup, -``young`` for young pages, ``addr`` for specific address range (an open-ended -interval), ``hugepage_size`` for large folios of a specific size range [``min``, -``max``] or ``target`` for specific 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 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 between the list of the DAMON context's -monitoring targets list to ``target_idx`` file. +and ``target_idx``. To ``type`` file, you can write the type of the filter. +Refer to :ref:`the design doc ` for available type +names and their meanings. + +For ``memcg`` type, you can specify the memory cgroup of the interest by +writing the path of the memory cgroup from the cgroups mount point to +``memcg_path`` file. For ``addr`` type, you can specify the start and end +address of the range (open-ended interval) to ``addr_start`` and ``addr_end`` +files, respectively. For ``hugepage_size`` type, you can specify the minimum +and maximum size of the range (closed interval) to ``min`` and ``max`` files, +respectively. For ``target`` type, you can specify the index of the target +between the list of the DAMON context's monitoring targets list to +``target_idx`` file. You can write ``Y`` or ``N`` to ``matching`` file to specify whether the filter is for memory that matches the ``type``. You can write ``Y`` or ``N`` to diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index a959c081bc59..7360e5ac0d06 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -600,23 +600,23 @@ counted as the scheme has tried. This difference affects the statistics. Below ``type`` of filters are currently supported. -- anonymous page +- anon - Applied to pages that containing data that not stored in files. - Handled by operations set layer. Supported by only ``paddr`` set. -- memory cgroup +- memcg - Applied to pages that belonging to a given cgroup. - Handled by operations set layer. Supported by only ``paddr`` set. -- young page +- young - Applied to pages that are accessed after the last access check from the scheme. - Handled by operations set layer. Supported by only ``paddr`` set. -- pages that managed in a given size range +- hugepage_size - Applied to pages that managed in a given size range. - Handled by operations set layer. Supported by only ``paddr`` set. -- address range +- addr - Applied to pages that belonging to a given address range. - Handled by the core logic. -- DAMON monitoring target +- target - Applied to pages that belonging to a given DAMON monitoring target. - Handled by the core logic.