From mboxrd@z Thu Jan 1 00:00:00 1970 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 E9948C83013 for ; Wed, 2 Jul 2025 05:16:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D6B78E000C; Wed, 2 Jul 2025 01:16:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0387C8E0009; Wed, 2 Jul 2025 01:16:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E69248E000C; Wed, 2 Jul 2025 01:16:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CC1AC8E0009 for ; Wed, 2 Jul 2025 01:16:16 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AB21B5B186 for ; Wed, 2 Jul 2025 05:16:15 +0000 (UTC) X-FDA: 83618163510.07.25FFAB7 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf20.hostedemail.com (Postfix) with ESMTP id 238181C0009 for ; Wed, 2 Jul 2025 05:16:14 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oVPJBL6H; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751433374; a=rsa-sha256; cv=none; b=PExxciaDc6ZetT4SNL6X65NxQk/zGHUeij6/RlMcvjkxlCNGKIalQG8H7AASZw+Rzll9/N Ctxq2tJZ5CbOjBmpWC3NhdXrnuAQ5SF+ait9cBGAXVC1IMSZRF4dIgsRgvXrELxRLjl3Ny TqWiRX/iMg1fqJ3MA0K2/UGJo4u+ZcI= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oVPJBL6H; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 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=1751433374; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yr5ONLqsS6LznDJD9b2+YwV/ZW2+0Op1R8WOf/BJAGI=; b=Lu9Tk1Q/IzBjuEmnUcOhDnzDCEP51YPcvyMf9ooYuHMlqDMl+3Ek1JHLQ/VugkcQA4m/JD 76N95HnL4Mbrj9sPoHt/zX4vDluhByf0eIYyFBVBQ+2diRukqwV8synIqZ/nHwPAosRKho sLWhpC7J9qO6vFyyMeTYDnOIbNj3VEs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 99F3361428; Wed, 2 Jul 2025 05:16:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17ED5C4CEEF; Wed, 2 Jul 2025 05:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751433373; bh=4kBKgmAO4np7zdvd9JkbBqwwr9+oQ8UOuTjsr0PkuTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVPJBL6H2dNgRxmRll33awS9kIJXspDmEAxzkNfDreiYt4TeHAsJVn72hjGbDePNK SV4p3RN231tMEmgmYqZ0HbCTfxn2XmkmwjoqQSv9qpctWq4jIJ7UKgGILJmLFslw5n 2Ysw1kYabYPvMt0UjL3Ps86Tb6WG9yFJo2vrNvhwQ11u3IBA9GVWRaXsmpKddQipSV sz23UEo0yKVAnfNUtTsj0hk1cb/Wxe4z0qrFoQDCR8SVk26tJhmOxNL2p1QAi4N9Fu iEQA2UlFiVTadpVXLNzLt72yKp//XUTtNOt4GWw6Ibm76FsYahQYL3Ad9Wgm2Sidlq bajLNmlx3F7aQ== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Bijan Tabatabai , 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: [RFC PATCH v2 6/6] Docs/admin-guide/mm/damon/usage: document dests directory Date: Tue, 1 Jul 2025 22:15:58 -0700 Message-Id: <20250702051558.54138-7-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250702051558.54138-1-sj@kernel.org> References: <20250702051558.54138-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 238181C0009 X-Stat-Signature: 6gkw96p9qub6ip18pzrm4szt3799esd8 X-Rspam-User: X-HE-Tag: 1751433374-852643 X-HE-Meta: U2FsdGVkX1+c6UBGfo0Ppv8t9iFWDoIDbdatmNiLva4EzZ0w7sukk3DP+aZtPIV2IRjwo3g62fYSZhGGW09OlRbYm8rRmtXVwgXvODhdV+fnGOjZcrkR4SSarrAe+p7HBao4q72Iign4jnIv2xyUTo6uq8ubFtLGJTwbwM8HI9GfmrBdGgC0AdFzrHbpLZvJgBiyDHPOy7+tFJjzql9KugdyjugCuZi6N+4wO1Gp5VwzJ0oGK9ht5DMOK8BASy4hs3DdrafZyfc23wgrRu6ZRz/YkOrIlYfAYK/13XcaxcctKYQgJBltKhwTErqF2wVe/Iy+s2UanQb/0zJ+sQpQ1mGDgNfWlpbEbgHasjQ+TOfxRogoXvPZoEJT+vxNqaplDwq1qrCDFqPoChTROsgRcyeiuYUdITJrBWRuP1ien60tt4xkVXMNFH4MV3HCpKKUQrgREDFOnIzbRm8bBOvRhYecd82swP/rlac12NSIdcMNGSTBcZO3TWyE/HrdyPqnS7cdx8Hf1mnXRsl5dbDGBKxpzwR4oQYArENavtiZ/7ivSRaLKzicyoTXcx2IhqDGuEW+Lp+X4BRl9Akdsh9sWir8JD84bIfDdMFSN2Ij0AXhb5ooztztJQqBRcfiqjOsWC7n7nJSIICPXW94BVgzkPYzxcLIxWoiK+fSY1y04ARbr40DRuYTZrIDR39Uqz5AcaNhWo39gsNcDNoeLBpOLAgW3Ww4Bzo/8F5ts2JPPoBfrEeMaitpY2AsL6XHYXioGND3m0P/byAaa0ZPMadDkYUHiWJP99s7R4ae/4O9ZX65S2xeCAukg+tEnuW5AvSEMs94wWIEZmzU6y90kQ3oYyZ+YD+nc2mCzofDPXCOsthtKAYq/7jMfHN8+KdLYk/3lxvbsHUH5Ph4mqH6COEm2pWluY9S+j6N5qsi4Spx7eBszkBpaAXuo9cc80S7/e+CIsWTqvU9DIEqVKVFFaT mH9+Z8O0 OPg6sYhlfVvpCOH8sNlSs6OQ/XOHD2kbZHW1cy6wvIUD1LPFGxLpcbAykhv0jzXOZaWunb8QsKlbYY1bY6RZS3ZKyo+6wJXoxU/Fc2hzU1AMIr6AIdskHTddc0MoyRWFel0Ui6rS2j7ti22k/s7zfs+UKK4ou/mKFFu36vjhaHyJYIlD/72W2E8WiLfBnP0laJSPeocKUu9xkPpc2fQ3xWnHbMI5xS+awJYYQo8QpjX0PvDnh5vRNsXjeJGf4lw5piavMsA7HF6+xXYt0mESCj0zhDIKZB2qY2cQl0ohExhUN2/E= 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: Document the newly added DAMOS action destination directory of the DAMON sysfs interface on the usage document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 33 +++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index d960aba72b82..fc5c962353ed 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -85,6 +85,8 @@ comma (","). │ │ │ │ │ │ │ :ref:`watermarks `/metric,interval_us,high,mid,low │ │ │ │ │ │ │ :ref:`{core_,ops_,}filters `/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,allow,memcg_path,addr_start,addr_end,target_idx,min,max + │ │ │ │ │ │ │ :ref:`dests `/nr_dests + │ │ │ │ │ │ │ │ 0/id,weight │ │ │ │ │ │ │ :ref:`stats `/nr_tried,sz_tried,nr_applied,sz_applied,sz_ops_filter_passed,qt_exceeds │ │ │ │ │ │ │ :ref:`tried_regions `/total_bytes │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age,sz_filter_passed @@ -307,10 +309,10 @@ to ``N-1``. Each directory represents each DAMON-based operation scheme. schemes// ------------ -In each scheme directory, seven directories (``access_pattern``, ``quotas``, -``watermarks``, ``core_filters``, ``ops_filters``, ``filters``, ``stats``, and -``tried_regions``) and three files (``action``, ``target_nid`` and -``apply_interval``) exist. +In each scheme directory, eight directories (``access_pattern``, ``quotas``, +``watermarks``, ``core_filters``, ``ops_filters``, ``filters``, ``dests``, +``stats``, and ``tried_regions``) and three files (``action``, ``target_nid`` +and ``apply_interval``) exist. The ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read @@ -484,6 +486,29 @@ Refer to the :ref:`DAMOS filters design documentation of different ``allow`` works, when each of the filters are supported, and differences on stats. +.. _damon_sysfs_dests: + +schemes//dests/ +------------------ + +Directory for specifying the destinations of given DAMON-based operation +scheme's action. This directory is ignored if the action of the given scheme +is not supporting multiple destinations. Only ``DAMOS_MIGRATE_{HOT,COLD}`` +actions are supporting multiple destinations. + +In the beginning, the directory has only one file, ``nr_dests``. Writing a +number (``N``) to the file creates the number of child directories named ``0`` +to ``N-1``. Each directory represents each action destination. + +Each destination directory contains two files, namely ``id`` and ``weight``. +Users can write and read the identifier of the destination to ``id`` file. +For ``DAMOS_MIGRATE_{HOT,COLD}`` actions, the migrate destination node's node +id should be written to ``id`` file. Users can write and read the weight of +the destination among the given destinations to the ``weight`` file. The +weight can be an arbitrary integer. When DAMOS apply the action to each entity +of the memory region, it will select the destination of the action based on the +relative weights of the destinations. + .. _sysfs_schemes_stats: schemes//stats/ -- 2.39.5