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 3939FC83F09 for ; Wed, 9 Jul 2025 01:00:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA6A68D0003; Tue, 8 Jul 2025 21:00:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C562C8D0001; Tue, 8 Jul 2025 21:00:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B45018D0003; Tue, 8 Jul 2025 21:00:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9EF788D0001 for ; Tue, 8 Jul 2025 21:00:45 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 60F74583AC for ; Wed, 9 Jul 2025 01:00:45 +0000 (UTC) X-FDA: 83642921250.15.620540A Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by imf27.hostedemail.com (Postfix) with ESMTP id 9F5A24000D for ; Wed, 9 Jul 2025 01:00:43 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=TH5aQsFQ; spf=pass (imf27.hostedemail.com: domain of bijan311@gmail.com designates 209.85.219.182 as permitted sender) smtp.mailfrom=bijan311@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752022843; 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=H2jsjg4EouOhcgExOsiiXXDMU3g5WamEv1plw5aSp2k=; b=jcQKeMQEtQOmt2Bza4LikTzRkkxhyUWiyQPDYX7yhqO+uXQFqwYnvL4iBXqoGW6eYWwCHd a/OlClHU9AjkJiW36hyxdTXnhW1r2R+7cNA7nV/FL0GGJUGcRdl+8KQa/ws28WjZDiGV1u P+GtSES/xPoM2FyqaRbTeqdCIpblJpw= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=TH5aQsFQ; spf=pass (imf27.hostedemail.com: domain of bijan311@gmail.com designates 209.85.219.182 as permitted sender) smtp.mailfrom=bijan311@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752022843; a=rsa-sha256; cv=none; b=MtqswL4tLNi4YzTdl2m0+xrdI8F7alpETFcfUMEV2UOc1qaW9iloZ6PCkYbgL6myo8fWLE r4GzCaFtaa3fEFL2cC/uqb1GFQp/gAFY3cj3mrgIQ6DIWVlbVXvm1s03N1PtItXMS3eKXJ KY1y4/+9F0wraieFRxTxI9l2vL3rh40= Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-e733e25bfc7so4345918276.3 for ; Tue, 08 Jul 2025 18:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752022843; x=1752627643; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H2jsjg4EouOhcgExOsiiXXDMU3g5WamEv1plw5aSp2k=; b=TH5aQsFQZBzYdncz+P0nb/RK73agLIRPxerwYEgrzZScXF4Wr+m4PnjlPvYMQTDWtt PHJG9EZ50g27AQ3oEO7ZpdCOx+Xs3fHXcskDweTn7VwvTsewP3maayi3VUxhMy8K3d4T H2sjJ+olS40MzIevpCUmA3u7Bz6xpTlY8dTUd/TS/dPmRblPhVzw+JdsNKEm96oe/XX6 tLNswVd3YxbaicAUgZ9UVb1Eui4yTZOKCoLU/fUwyLOdTO3dEabXnDgT37M4PTbdLCUn LtL9Pe9GWmmubTS89N3be50YtTRRFyfSLrLZ0B3jLViZxQmXD75vvDl6l9hD0NRLPi+p dFpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752022843; x=1752627643; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H2jsjg4EouOhcgExOsiiXXDMU3g5WamEv1plw5aSp2k=; b=Tn+6dzq1XXejKg5Kazy6bmcwcL8aLLfT18hpIg+fan9yrtHpyCZgnmT/18BSglvfGS l3mpg3ZYA2I4Gmkq2CNHrzSJEBabj16R100sr3JS8BaAhw5a3530oWaUeniAeSnO+Kxr Mtm/16swVPLExJD/pNhjTk4DJkJNK2IhWUOMsNQOkP6AOQ96xOrPGRv7N6rn/E29+Lyp LyLrXf6FsDGwcD1i9uMszgRTAtn9PJlFjwIo39OEq6Aiiao9SGpy6sLklcFNanp1594F v6IRsPbsIRmnrBCHmQkCDv7GGHv9TwWalIxLPRKY1XbtOlCOFTUDbb56Xv+j43MZAGFK +xrg== X-Forwarded-Encrypted: i=1; AJvYcCUjeUFApYqUocvt4y7FiI6en9Jm2zDj8RNTdxE2lHp/YIoDP6XzDM3T90u/2oMf2adA13neY1brKg==@kvack.org X-Gm-Message-State: AOJu0Yy0LvfGMsbn4bqwH7QYHN5TGulAH8VUoVvRVXhNQPvD1hmAGfBF Ko642ft1sDd8FxpzY/sFqFN1It5mUDGMLNYDT0JI9TwiPJrN9wkAUhid X-Gm-Gg: ASbGnctdnioJFubdcYaMd2W5/hFNnaw9ghaan1oM6zXFiyUns1HjAW2qgMhHUipyiVC 9hDipumau9XLq/7vJuCeXNnaB2XQL+evMOViN+M5coZHjtx4NjivNnAFqh1nIq0vsfawWFsl4wj Nk7n8SAWcbTe0fRevtgEUDkpXCrOEmeJdlNO9GO7+y3ZvtW4ur+YORA2lmwFjJ11XurVXy2CUSv l+9vsXwO+0wn97buuB5t56GQ4zuHADBGi8J4EM3CcqSZlz6OoHc8/+HdYcCt3tBrd7J0qZbFLRg VwDsYCyY+PN669RR5YapmuZxekjk8WtTeZ4Z5uMm8eVazDONFWOdmyssYNkDSqPvu9NcCvN3s6G zKKfJxdk= X-Google-Smtp-Source: AGHT+IG9eIe5dClap9KCxt/8jsEpzJHg4xsuwYOTV9E8tYS1KG14U14qxbM4oZ2qYkqz80lDz0BJew== X-Received: by 2002:a05:6902:2c05:b0:e87:982c:5528 with SMTP id 3f1490d57ef6-e8b6e151739mr662630276.40.1752022842295; Tue, 08 Jul 2025 18:00:42 -0700 (PDT) Received: from bijan-laptop.attlocal.net ([2600:1700:680e:c000:235f:99bb:f36e:a060]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e899c43ed8asm3656043276.26.2025.07.08.18.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jul 2025 18:00:41 -0700 (PDT) From: Bijan Tabatabai To: damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: sj@kernel.org, akpm@linux-foundation.org, corbet@lwn.net, bijantabatab@micron.com, venkataravis@micron.com, emirakhur@micron.com, vtavarespetr@micron.com, ajayjoshi@micron.com Subject: [PATCH v4 06/13] Docs/admin-guide/mm/damon/usage: document dests directory Date: Tue, 8 Jul 2025 19:59:36 -0500 Message-ID: <20250709005952.17776-7-bijan311@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709005952.17776-1-bijan311@gmail.com> References: <20250709005952.17776-1-bijan311@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-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Rz13LEeRnFj3 JhAxvuUX eMV6zl9zeXFwWBSM= 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: From: SeongJae Park 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.43.0