Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5524929rdb; Wed, 13 Dec 2023 11:04:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5Xu4FEC0w8kSKDUexhYFR2THVwtKcPK+SDDR6ACfYwfRVk7Fq7y7DmX54xOJ9o5JkIhoy X-Received: by 2002:a17:90a:4406:b0:28a:bc14:8f08 with SMTP id s6-20020a17090a440600b0028abc148f08mr1453882pjg.88.1702494251104; Wed, 13 Dec 2023 11:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702494251; cv=none; d=google.com; s=arc-20160816; b=m1ZfOKow4EVY48CNY94ocV6tGE3LlDy89Ng05XuIamwvby+FIYgBhg2udb0fiajjGd dZwXZm1sUhMpVuraAQuC8i5oDqp7KOXgkhenJDYFC/Ku4+LkepvvUrB9TZk/m00oqGtB UNtRMlLAcBFQ/PkgVC5u/c1Bdup+4EENPqtH5CMmttibqVFw+3Um+q+Gi9fJ6FKepIP7 1LuvIsTlNH0WvJaNVNog/vKnBZN9X/FmHI+fqQi8fUt31uHy3wgEwpMhmixKmN012Ut/ F/CUBzDUN7gOsaFDblfOFEvhUokli1FYhsWnUBfGGLh+ED24Q5yze6r24nf1jU/qgGMV mgAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z5ZZL030cjbFKJESoqIXvbN6aND0RDo6Xr5J0iXaGuI=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=E7oXai9tqb/tdmsU6MyQ/AtUMaLHogdaeYd1foZviLWP5peBO376JEN7BtUF9GIJ6y EcrGfV5LhryK/ctj4EAwQg58P7y5ILSUhcSP4o32kAwWlRAVBcGYlyKH3B3rwuNb5yLw SR7mF12sz6UqnUBhKchWxsb72TinhUmxDcnhf/rlBWOEpErX2Uyple1Ywz95dFrt3tLb TtDaHjqMajnpGaEzdHYnF7t/9f9Q2id5I6wTtu84OQQHC2GctyTZd2My2/KtYW7ljNAc v5vQszHpdouTOSvstxaX9BmljOcDmP9FoFcd8rVYy6IX4xrUQuFbBfTHrblm0vyAcgqw E/7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CmocNWl3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o22-20020a17090ab89600b00286e9d394d0si10002609pjr.23.2023.12.13.11.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:04:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CmocNWl3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E4F54802D026; Wed, 13 Dec 2023 11:04:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379349AbjLMTD4 (ORCPT + 99 others); Wed, 13 Dec 2023 14:03:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235386AbjLMTDu (ORCPT ); Wed, 13 Dec 2023 14:03:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6109BDB for ; Wed, 13 Dec 2023 11:03:55 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70EBAC433C9; Wed, 13 Dec 2023 19:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494235; bh=kQlCzt4zp30gEmZhugHeoZj6PZuokXzF1ZrH8vPgcLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmocNWl3Jdc8Dqs1hBubEL4b1RStm9nRj5Jc2Rli1sDWRw7vuP4QcTV6z46jKUSqC PthmZ9WuzR3CbA9bZpzGCeRTfCbZwSNr1Plrlqvrz98vJiLjZ8LWKhUzXpYLrkRidG FviqdxoXZhJhX4hOQNnGgUXBqfppAvzUTy3lwoT0Cl2+v17BHIWFeLyZ9IIoxShOmI Yhem41ybWkVGEKSAmTaYfcsCYXKU6DEklVlGKg5MABzCEaBqfIH9kPymXnu2UAeAs5 Ec8qOrOwG2hnE69hrDDgp8ETY6MQgORm/i6Bkl9B4OtZXYhYgxKev6q87rVzLlB4Mu lfdW8oBINHfEw== 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 6/6] Docs/admin-guide/mm/damon/usage: use a list for 'state' sysfs file input commands Date: Wed, 13 Dec 2023 19:03:38 +0000 Message-Id: <20231213190338.54146-7-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 11:04:10 -0800 (PST) There are eight command inputs for 'state' DAMON sysfs file, and those are verbosely explained in multiple paragraphs. It is not easy to find explanation of specific command, and getting whole picture of supported commands. Replace the paragraphs with a list. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 47 ++++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 671d3e50b998..9d23144bf985 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -130,30 +130,29 @@ In each kdamond directory, two files (``state`` and ``pid``) and one directory (``contexts``) exist. Reading ``state`` returns ``on`` if the kdamond is currently running, or -``off`` if it is not running. Writing ``on`` or ``off`` makes the kdamond be -in the state. - -Writing ``commit`` to the ``state`` file makes kdamond reads the -user inputs in the sysfs files except ``state`` file again. Writing -``commit_schemes_quota_goals`` to the ``state`` file makes kdamond reads the -DAMON-based operation schemes' :ref:`quota goals ` -of the kdamond. - -Writing ``update_schemes_stats`` to ``state`` file updates the -contents of stats files for each DAMON-based operation scheme of the kdamond. -For details of the stats, please refer to :ref:`stats section -`. - -Writing ``update_schemes_tried_regions`` to ``state`` file updates the -DAMON-based operation scheme action tried regions directory for each -DAMON-based operation scheme of the kdamond. Writing -``update_schemes_tried_bytes`` to ``state`` file updates only -``.../tried_regions/total_bytes`` files. Writing -``clear_schemes_tried_regions`` to ``state`` file clears the DAMON-based -operating scheme action tried regions directory for each DAMON-based operation -scheme of the kdamond. For details of the DAMON-based operation scheme action -tried regions directory, please refer to :ref:`tried_regions section -`. +``off`` if it is not running. + +Users can write below commands for the kdamond to the ``state`` file. + +- ``on``: Start running. +- ``off``: Stop running. +- ``commit``: Read the user inputs in the sysfs files except ``state`` file + again. +- ``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' + :ref:`quota goals `. +- ``update_schemes_stats``: Update the contents of stats files for each + DAMON-based operation scheme of the kdamond. For details of the stats, + please refer to :ref:`stats section `. +- ``update_schemes_tried_regions``: Update the DAMON-based operation scheme + action tried regions directory for each DAMON-based operation scheme of the + kdamond. For details of the DAMON-based operation scheme action tried + regions directory, please refer to + :ref:`tried_regions section `. +- ``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes`` + files. +- ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme + action tried regions directory for each DAMON-based operation scheme of the + kdamond. If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread. -- 2.34.1