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: 13491788 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 A841FC4167B for ; Wed, 13 Dec 2023 19:04:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B77E8D0055; Wed, 13 Dec 2023 14:03:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11B388D0049; Wed, 13 Dec 2023 14:03:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5E7A8D0055; Wed, 13 Dec 2023 14:03:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D40498D0049 for ; Wed, 13 Dec 2023 14:03:58 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 78819120314 for ; Wed, 13 Dec 2023 19:03:58 +0000 (UTC) X-FDA: 81562719756.20.658E849 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf24.hostedemail.com (Postfix) with ESMTP id 9FC57180032 for ; Wed, 13 Dec 2023 19:03:56 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CmocNWl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 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=1702494236; 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=z5ZZL030cjbFKJESoqIXvbN6aND0RDo6Xr5J0iXaGuI=; b=Qwx9ExE41kliHUR5wXC5u9e1NCQbkE26z8S07L5hJ0y6aMeAvhS3HMad4DP8I6F5izldRI Go+vqNZT7IPE9GQn1HmZwGbXMqv5HhVmxBGkyFQv2GO+m5NVe6nQ9gTGV0maOPizl55SrM x28mJac0sZB/5Lb2i1qlcoV441bWqiE= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CmocNWl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494236; a=rsa-sha256; cv=none; b=T53yq0KZoXYOYq2EKvpOqhZ4/AekJoUNW2M+aTF1qrkZVVINDhphpbN1bLjJ6zcKkJsHJK 7V8X0yKeaCWDfZv56FhANcKl+ftBjBVk1X+1+2quYACnge9JthdOWgeZGri2URfjXzdoxZ Jw5UFV48EF1q3OmnL4MsbYFSgzEcNgs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 553F4B81F22; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) 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-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9FC57180032 X-Stat-Signature: dbcubp3htq5476pxgp44m7bxse5khhkm X-HE-Tag: 1702494236-754765 X-HE-Meta: U2FsdGVkX1+av5qwubDOzPJyr1JISUZu6JVtpK+YtvOcklT20GjXiN5Sl1pkKPLtDAvk9vsNAp57K7mUU8a/O6t2EjC7pcHk0nL+XitybYNwGnCvWy0iM7yLNpfbR1/WLEP91OuoDYSypcBnw6IL0Dw638dM3u0ay4ZOq0A7Yp5YjiDBwj28/GASSfPEOWZcAooeXTpUEDT6sGFOJz+eZHG47GtduNvPfdsI02eOtvUHDqpeaaNNadA25wzco5XJdlomYmhfPnPJ5FGY06c272YFX8M1YykVXw5Kqf7PCpAUwg9tVNWAFgOfmNe8ag1BG3Lt9j1afkXBdTnWleNOvo8QJbAVKBUM2zQE9fsfzOcwIBlGsCXogRlbf1gK5gg6W4RYjDStH5YpLyoEohecHGkVAy0FD7owh5lW8GMylsrWXCAJfjTyjYKAAO5Z/9jG8cDBXhKCWDmQ07uPkFKq22S/xtO8SO3IOwBWwUF4M7Zbv5Oib/wwwk/gUeACi7i5J7YvmJymxBdVFASwGgttA+aYMD22ZeEH9WHeZrCLLRMhq2KIPwro5BuaxK4xve5JJQd0DGrsHGLMVp80/9HVW8POZYl7xTwNyC1joIWTQF7Sx1gk28V1cnwd/TBFGdIDNaPH1gpXxQ3TtyTVeBw0EW5jrjLmh48aMqQTq29mn2n30zjpow1MODTUuDtgHlCmajHC1sK8sFe2KvzdGmRvCTrQYe1618F6/duBL5fJQaGcqjYfH/QHbuJD3k4LcxXXmzgWG3tGdxrML36uxxa0rw6Cxm4tIxnL1mFEmDxpqbRcFW6Ci8QZDW4fD1HpDomsGyL/rUX8KAdO/JWfNDBe6uDcVlMOmCw5VAKqLz4cm3XgVp4YD4Rl2srzR5ESGszkjMNOzjVfXbaPMu/PblhGdWv3vSBS6wl7NEHzd9G8c81/EByjrwtdIuV1h7i4IcETfTkzjfhJCFsZ0b1KFbe 7JyyoY8d FJMzARiXUlwSg/2xlI2mUbLrPshxOcftNT94tENRtPCPNA6rmO09FtXFgnrGX0nX5WzBK9PoyL+7Caioc+ntYZ0niO0IR4TS/w4dsv90dqQxTikR8kP8PlAMT+Tm5g69lq4USCYbCzqplGYv/MZDSxUX7AthRXX16RwnUhMbOJeIoubZTh1bDpD9He6nMMaTEJMNzK7dpyY3JeXHpQLAd3phV5cQjHXNVQjqoGUb51EvoeXsQ/7MHZL41GYytVJiKcZgIKH47uFGj6R8= 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: 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.