From patchwork Wed Dec 13 19:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 178263 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8003595dys; Wed, 13 Dec 2023 11:04:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlxEaJeeuTRt+siFcXwe7v+3LITZ2tHRGQ3XsvP2mCxGOZu7bthBuhXQ3sLr2T1U3lbM/Y X-Received: by 2002:a17:902:b486:b0:1d0:a36c:3e2e with SMTP id y6-20020a170902b48600b001d0a36c3e2emr3644225plr.61.1702494251505; 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=pe1T6TbYKKdo8W7wsqI+BGxP83DzT91uK6nwlcvAalhxtM73dbydEOcd7ZDAcnisFL 7rHz9QuJPSyWxLypcz8OPiCqXIHbdF24URqTTlqciHaFpuOdUE4BqceT99kTHiwh6Oap VrACIKGt2xlHZhSno7fOEzmFKpKQFuDOARhrtC5XDuohILzEZKQDiNMb3ViUppaOkpH+ cCkxOPoaQFNGBbzDwpuMndxSrCnXIWEIVjqgVlDsKBJ2fdDmojSNGuQqgdmMVOjjtdVW lYJMC5E6laPJVjkPktPxTZp6R1Wt1YQTje0+eAJXp7EAewM5dFZPdIblHRZCMGbOmxIE Beag== 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 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o18-20020a170902d4d200b001d347c358a9si2139031plg.6.2023.12.13.11.04.09 (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 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; 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 2620:137:e000::3:7 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 EE349802D23B; Wed, 13 Dec 2023 11:04:08 -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 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:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785194611975668574 X-GMAIL-MSGID: 1785194611975668574 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.