From nobody Tue Dec 16 12:34:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD6711B5B3; Sat, 17 Feb 2024 00:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; cv=none; b=nJHYiw96uDF1HwMERUrNfDV5SGrhE6skjPyqEOZvG8a2MohKkP0SSJqo0H1Cak5sWkt+XZCpxpFBebBl254+mfrKM/g+pI3ysOeNTRqTcCMMoG5cKjvMjtem2SziQ8eSavoFvDAQKworCW2sJqoQrUQbifxMVKDMWSaxOADGKMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; c=relaxed/simple; bh=Amv7MsMRrFhTpSKvV6b53ASGSJnoAb83web7cZHL2Xc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CWhIDH8hIFjV19P2oNGet8K0Idzkyd3455/sQv9HIIIqr/cQFeaWELKNPNXTMoLmJt65JxjPonbAVDUm175AQ0W9p6Nf9zdokwTB9daFND487WOAcrCi1qZeRgYWWlmXR82Dg8se2cl/nerA/EfcSctrHCccbmx4fNjyMM74DO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sAnP8Y39; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sAnP8Y39" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9018EC4160D; Sat, 17 Feb 2024 00:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131527; bh=Amv7MsMRrFhTpSKvV6b53ASGSJnoAb83web7cZHL2Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sAnP8Y392axNOEc8YRW/0sLDcxwLLHJPPXLuM6vPeVUqHE9FZZ/BorXpOA8r46Lfe aZFCAYNsDJYrS2BSgzsvoHGCGNdYJwdwkZCXotxUD+CrxbXlossn69i4lNDZDDN9/S qauCf0OHvQfTTOGIw7WEGv+QabZEoJiePobg1Iv1ZlICP+jxERy+4cqGy9v0tqXoRp xff7mNIotAANdwocgZQ5Ap6kzQs3DuaXmJwU5j0xOURVwc9cGhqGxAD3GGTcOE9lpg ZmA34gsmsrJ9cJ4Bhhbbezp0nsFTU+wZcYyV9lG9IPuHGrsll0j6aelOHeoESW634c xNlHDVxJQYEZw== 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 1/5] Docs/mm/damon/maintainer-profile: fix reference links for mm-[un]stable tree Date: Fri, 16 Feb 2024 16:58:38 -0800 Message-Id: <20240217005842.87348-2-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A couplt of sentences on maintainer-profile.rst are having reference links for mm-unstable and mm-stable trees with wrong rst markup. Fix those. Signed-off-by: SeongJae Park --- Documentation/mm/damon/maintainer-profile.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/mm/damon/maintainer-profile.rst b/Documentation/= mm/damon/maintainer-profile.rst index a84c14e59053..5a306e4de22e 100644 --- a/Documentation/mm/damon/maintainer-profile.rst +++ b/Documentation/mm/damon/maintainer-profile.rst @@ -21,8 +21,8 @@ be queued in mm-stable [3]_ , and finally pull-requested = to the mainline by the memory management subsystem maintainer. =20 Note again the patches for review should be made against the mm-unstable -tree[1] whenever possible. damon/next is only for preview of others' work= s in -progress. +tree [1]_ whenever possible. damon/next is only for preview of others' wo= rks +in progress. =20 Submit checklist addendum ------------------------- @@ -41,8 +41,8 @@ Further doing below and putting the results will be helpf= ul. Key cycle dates --------------- =20 -Patches can be sent anytime. Key cycle dates of the mm-unstable[1] and -mm-stable[3] trees depend on the memory management subsystem maintainer. +Patches can be sent anytime. Key cycle dates of the mm-unstable [1]_ and +mm-stable [3]_ trees depend on the memory management subsystem maintainer. =20 Review cadence -------------- --=20 2.39.2 From nobody Tue Dec 16 12:34:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41A731B80F; Sat, 17 Feb 2024 00:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; cv=none; b=qOvYOpeYqJWT2ZzLAQcAiyA18b1hfma/ykMpZlkTCv9WLOJ4aQq7ASccP6ZTo/ON3euxNAtraJQzA1VgZGsiph5bqjspyFYEkqJLqiupZTClz7W7sztnfIwxvNx3iJOy8vF3VBhV8JvGO0/7BAYpeIWKMQUG7QE3bTzVo2yuc0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; c=relaxed/simple; bh=ZF7Ys29G8g/k6D1jFHkNld6ID7JrPCUQzMebjrLS5cc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DLm5Y1xswx8lGGuvCA+3gmcRW5S1hBfGm2vTcj3Lq/8bMJRLk/q0hPn1r1vAj29Ek/gjgNTXexeUf3dHXElir4EKBBjgDFQl5jMsfCX8Dhm5h/cggINih7NxLatYaRs+vC1YRD8rjED2m3VlxFQc3Ut0vR+8kdv0/VSheFc/6sY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ab1s7a8Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ab1s7a8Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A969C43394; Sat, 17 Feb 2024 00:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131528; bh=ZF7Ys29G8g/k6D1jFHkNld6ID7JrPCUQzMebjrLS5cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ab1s7a8ZVMd65Gov613sVFUA9Z1HOsB0ADjuIBE2ac+9N/3GFt/fZ3Jh3yqR3KlAU ZBCbYFIJ/7sYSlVdaUALdwiw7n5Vz70vwWf/AMYu6WrYE30mAQ5MznaR6kRP2y/VwZ eApMMw8nps4ukwaCWHjwmqguvLzL6Z7xRQBAmFLZfPLPv5aG9wQAYvZvMcvBsKcOTQ go4PJwvFy2JnFHrjrtignzt40wD0jMQVyWcqbkCYt37sb71r90hFvv3Ib8T5u9ZP9w P1SYlEYr2cLkqkL8Q/QYAVJOpFM2r/ZPc5tslHjzZIMxnD2DQGrKbNzR5QMRQkwm0G TEa6NN702cKYQ== 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 2/5] Docs/mm/damon: move the list of DAMOS actions to design doc Date: Fri, 16 Feb 2024 16:58:39 -0800 Message-Id: <20240217005842.87348-3-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" DAMOS operation actions are explained nearly twice on the DAMON usage document, once for the sysfs interface, and then again for the debugfs interface. Duplication is bad. Also it would better to keep this kind of concept level details in design document and keep the usage document small and focus on only the usage. Move the list to design document and update usage document to reference it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 47 ++++++-------------- Documentation/mm/damon/design.rst | 26 +++++++++-- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 58c34e66b31b..0335d584956b 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -302,27 +302,8 @@ In each scheme directory, five directories (``access_p= attern``, ``quotas``, =20 The ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read -from the file and their meaning are as below. - -Note that support of each action depends on the running DAMON operations s= et -:ref:`implementation `. - - - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. - Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. - - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAG= E``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``lru_prio``: Prioritize the region on its LRU lists. - Supported by ``paddr`` operations set. - - ``lru_deprio``: Deprioritize the region on its LRU lists. - Supported by ``paddr`` operations set. - - ``stat``: Do nothing but count the statistics. - Supported by all operations sets. +from the file and their meaning are same to those of the list on +:ref:`design doc `. =20 The ``apply_interval_us`` file is for setting and getting the scheme's :ref:`apply_interval ` in microseconds. @@ -763,19 +744,17 @@ Action ~~~~~~ =20 The ```` is a predefined integer for memory management :ref:`actio= ns -`. The supported numbers and their meanings ar= e as -below. - - - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if - ``target`` is ``paddr``. - - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if - ``target`` is ``paddr``. - - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. - - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if - ``target`` is ``paddr``. - - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored= if - ``target`` is ``paddr``. - - 5: Do nothing but count the statistics +`. The mapping between the ```` values= and +the memory management actions is as below. For the detailed meaning of the +action and DAMON operations set supporting each action, please refer to the +list on :ref:`design doc `. + + - 0: ``willneed`` + - 1: ``cold`` + - 2: ``pageout`` + - 3: ``hugepage`` + - 4: ``nohugepage`` + - 5: ``stat`` =20 Quota ~~~~~ diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 1bb69524a62e..9f16c4e62e72 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -294,9 +294,29 @@ not mandated to support all actions of the list. Henc= e, the availability of specific DAMOS action depends on what operations set is selected to be used together. =20 -Applying an action to a region is considered as changing the region's -characteristics. Hence, DAMOS resets the age of regions when an action is -applied to those. +The list of the supported actions, their meaning, and DAMON operations sets +that supports each action are as below. + + - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. + - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAG= E``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``lru_prio``: Prioritize the region on its LRU lists. + Supported by ``paddr`` operations set. + - ``lru_deprio``: Deprioritize the region on its LRU lists. + Supported by ``paddr`` operations set. + - ``stat``: Do nothing but count the statistics. + Supported by all operations sets. + +Applying the actions except ``stat`` to a region is considered as changing= the +region's characteristics. Hence, DAMOS resets the age of regions when any= such +actions are applied to those. =20 =20 .. _damon_design_damos_access_pattern: --=20 2.39.2 From nobody Tue Dec 16 12:34:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A2FB21100; Sat, 17 Feb 2024 00:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; cv=none; b=hlXFef9vtaGwaHb+MzVsLh4qGhp8uY8ebLN2PovHLzML85VPkbXBmfHyl5Cm+QG66YOmFUBorjZ6Hkt182uHuxPuEj38KsdOqfgZuuL68ShC0k7+efpujktK26hcRnel1c2WvJ7mX3Ji5k1tI2+Q8St6j+Ot0FXh85thKknMrWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; c=relaxed/simple; bh=PHukevGUaPQZ0Um8hgVXJLMqOMYMR4EFewceSXfTR20=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=L4nTWxQXHhMxY7ywXPaJCC0lnFRFYNWYoa06puRvABJRvIRxsI5hu5q2u7IUhqW5e/cj7lTxYsBLOXXf11RXMJj6J8JHQLkWE3Evo01U+Nb18fVQcFfcQciJJnpdcm5XnKtrrt8pLPE43G6cRc91uo2yeRqnZKMObhvBrf27PPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V1LRIars; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V1LRIars" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E7F1C43390; Sat, 17 Feb 2024 00:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131528; bh=PHukevGUaPQZ0Um8hgVXJLMqOMYMR4EFewceSXfTR20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1LRIarsi4JEdp5awudjc8ZjiK4TTDFQvBacB7HgvC9og6SplSDfSj8p9vx7Nj1vU MXt6mtUIt/A3GuCr60Kt4C+LT1P/BFtsSq+1sFP5SzhpblfgpDJHEx1coctwHfxF4Y 1aflAnUaAPr8y286nDAaC2Bx03T5qXXnXP06wYAtuL//9xKsm8/mbH/ZdM2H3zWRAm 4fW0ZDYAO0hI2FGOwq5MynjPnqmI6ulZsgjSumQuTmBN1vesW0pIRAvRFhu216FWyw w0N6B3qOo/dajkSf/2tCIL8phQRnHhfS9cwp+sb++optf0lUc91VHsTIbSMYg2mbVc vi47D6ILa3s6g== 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 3/5] Docs/mm/damon: move DAMON operation sets list from the usage to the design document Date: Fri, 16 Feb 2024 16:58:40 -0800 Message-Id: <20240217005842.87348-4-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The list of DAMON operation sets and their explanation, which may better to be on design document, is written on the usage document. Move the detail to design document and make the usage document only reference the design document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 19 +++++++------------ Documentation/mm/damon/design.rst | 12 ++++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 0335d584956b..be0924f47a42 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -180,19 +180,14 @@ In each context directory, two files (``avail_operati= ons`` and ``operations``) and three directories (``monitoring_attrs``, ``targets``, and ``schemes``) exist. =20 -DAMON supports multiple types of monitoring operations, including those for -virtual address space and the physical address space. You can get the lis= t of -available monitoring operations set on the currently running kernel by rea= ding +DAMON supports multiple types of :ref:`monitoring operations +`, including those for virtual ad= dress +space and the physical address space. You can get the list of available +monitoring operations set on the currently running kernel by reading ``avail_operations`` file. Based on the kernel configuration, the file wi= ll -list some or all of below keywords. - - - vaddr: Monitor virtual address spaces of specific processes - - fvaddr: Monitor fixed virtual address ranges - - paddr: Monitor the physical address space of the system - -Please refer to :ref:`regions sysfs directory ` for detailed -differences between the operations sets in terms of the monitoring target -regions. +list different available operation sets. Please refer to the :ref:`design +` for the list of all available operation sets and t= heir +brief explanations. =20 You can set and get what type of monitoring operations DAMON will use for = the context by writing one of the keywords listed in ``avail_operations`` file= and diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 9f16c4e62e72..6abf976dd71f 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -31,6 +31,8 @@ DAMON subsystem is configured with three layers including interfaces for the user space, on top of the core layer. =20 =20 +.. _damon_design_configurable_operations_set: + Configurable Operations Set --------------------------- =20 @@ -63,6 +65,8 @@ modules that built on top of the core layer using the API= , which can be easily used by the user space end users. =20 =20 +.. _damon_operations_set: + Operations Set Layer =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 @@ -71,8 +75,12 @@ The monitoring operations are defined in two parts: 1. Identification of the monitoring target address range for the address s= pace. 2. Access check of specific address range in the target space. =20 -DAMON currently provides the implementations of the operations for the phy= sical -and virtual address spaces. Below two subsections describe how those work. +DAMON currently provides below three operation sets. Below two subsections +describe how those work. + + - vaddr: Monitor virtual address spaces of specific processes + - fvaddr: Monitor fixed virtual address ranges + - paddr: Monitor the physical address space of the system =20 =20 VMA-based Target Address Range Construction --=20 2.39.2 From nobody Tue Dec 16 12:34:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBB1A241E1; Sat, 17 Feb 2024 00:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; cv=none; b=PXanwopSashG0LAWmRo6MQgganVST878wkgqCF3TEQ9r17xTypfXQQPdsmjbeyBLkp4bxwrmq4RVFKvkfcHSmyKtcPL8I51ajOMgOquTiX4WHQSSARB6wh4p5H+w/X3bx5IjCXGK5rFVFSe9kTyAdLMiSaVU+gMmBx0sSoUroaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; c=relaxed/simple; bh=6n2FATexNcLId4djVWKHF9wa5NUBH9cgNCITDt2Fr18=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kH4ayuRYfUhlJXvfdM0MBVAe2ij7dBBw/ij/+YtESxwhaaVaGv/dOvCZS+A9n41JKYQw65UVjtKMveCBfgsY0s48wLJ7ZB8yDbRKWX7AgpuJFhctEUsVr8/IzTxOMmrZtzwhS7Rh5tez7tXVjClfUuX67IdU8JAjUdfkT9Q9RxY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ISsyfP3Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ISsyfP3Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00CB8C433F1; Sat, 17 Feb 2024 00:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131529; bh=6n2FATexNcLId4djVWKHF9wa5NUBH9cgNCITDt2Fr18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ISsyfP3ZrwLmaMw1RafF3JsD6d33RuEvcLcbAEmduwXDR9M2kuhUQTy9tz9cN7tTz NDeLa3meDWtsWp9y5+LB/9snyNbOChBxsbAKgTHiUQQyw4KeuVlYNhzGrX9uRpIS6x p/rhICMyyMBvQi+QYZMOESAHbv6fCQ+rQg1OwiPV4fneYCcCi6QM8vMhAeyCzBzCKR ekGrLzkmFRU6AekKPY9dToMotM6+gIEbLim4OOw7olVO397RqeIlqxXnMqOrc/iQtq ZG1CsALtnmtEPzB490JOvu11WJrILRoOW3W7aGazKv0zLOKUClugFBU3Ejeue9tFem Bf0eNvc+wkDuQ== 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 4/5] Docs/mm/damon: move monitoring target regions setup detail from the usage to the design document Date: Fri, 16 Feb 2024 16:58:41 -0800 Message-Id: <20240217005842.87348-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Design doc is aimed to have all concept level details, while the usage doc is focused on only how the features can be used. Some details about monitoring target regions construction is on the usage doc. Move the details about the monitoring target regions construction differences for DAMON operations set from the usage to the design doc. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 16 +++++----------- Documentation/mm/damon/design.rst | 12 +++++++++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index be0924f47a42..fefe62e0a466 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -242,17 +242,11 @@ process to the ``pid_target`` file. targets//regions ------------------- =20 -When ``vaddr`` monitoring operations set is being used (``vaddr`` is writt= en to -the ``contexts//operations`` file), DAMON automatically sets and update= s the -monitoring target regions so that entire memory mappings of target process= es -can be covered. However, users could want to set the initial monitoring r= egion -to specific address ranges. - -In contrast, DAMON do not automatically sets and updates the monitoring ta= rget -regions when ``fvaddr`` or ``paddr`` monitoring operations sets are being = used -(``fvaddr`` or ``paddr`` have written to the ``contexts//operations``). -Therefore, users should set the monitoring target regions by themselves in= the -cases. +In case of ``fvaddr`` or ``paddr`` monitoring operations sets, users are +required to set the monitoring target address ranges. In case of ``vaddr`` +operations set, it is not mandatory, but users can optionally set the init= ial +monitoring region to specific address ranges. Please refer to the :ref:`d= esign +` for more details. =20 For such cases, users can explicitly set the initial monitoring target reg= ions as they want, by writing proper values to the files under this directory. diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 6abf976dd71f..2bd0c203dcfb 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -83,12 +83,18 @@ describe how those work. - paddr: Monitor the physical address space of the system =20 =20 + .. _damon_design_vaddr_target_regions_construction: + VMA-based Target Address Range Construction ------------------------------------------- =20 -This is only for the virtual address space monitoring operations -implementation. That for the physical address space simply asks users to -manually set the monitoring target address ranges. +A mechanism of ``vaddr`` DAMON operations set that automatically initializ= es +and updates the monitoring target address regions so that entire memory +mappings of the target processes can be covered. + +This mechanism is only for the ``vaddr`` operations set. In cases of +``fvaddr`` and ``paddr`` operation sets, users are asked to manually set t= he +monitoring target address ranges. =20 Only small parts in the super-huge virtual address space of the processes = are mapped to the physical memory and accessed. Thus, tracking the unmapped --=20 2.39.2 From nobody Tue Dec 16 12:34:04 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C743E25571; Sat, 17 Feb 2024 00:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131530; cv=none; b=hLhf7+B4KmkP7XlaskecnCQ7zGbjgRHYebJRUgb2B2yFtf6NmZfxzjhfXCk8CtH2jRTisLEqCM4D7W7NfhWqzM5bzCGH+2LhnNkwxP75B86djTfK/fCkU1obBIheD/7NXc5AA3iv8kY85R09VwMfCDhslkPZ5GL1bi7qofDIrGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131530; c=relaxed/simple; bh=zjtUmDw2W04Oqswzi7ugwTbYsUfBySmq7qQ57D2h3/g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nFNLGfHvYCPmJlOA6TKoRRPT/XFPPBXDgS30guUgX2kIKpqKmM8WHVDanE+XJ4hZQNz7qZOgVtCEk/Ii0pp57+sEK/f76jM/6Xq5QndpFtAMsKO1GApmCZrSiePBCzfNfw1FWcr1WloNjYEPw/lJ3f8u5gDOCE+zUIhJFLdBKdg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K4bEzdFL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K4bEzdFL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5D15C3277B; Sat, 17 Feb 2024 00:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131530; bh=zjtUmDw2W04Oqswzi7ugwTbYsUfBySmq7qQ57D2h3/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K4bEzdFLDlF6NLqwGK/mAAgfMMKWdnJ8vklpKYAdUXCed+fMo4jl0CvKX/mU2OAFn arCqEtlWyJt5NSpJVt1S0W0F4hksykL5ZFvZ9d4n7IYMnUQy46xVjZ95hKG5qtazQ9 mqzObWI8j5FId7H/EaphvGBxODbmk1E3N9bOTqyw/OBjE81il5DUZ23VvjMN7QpFMZ UETBSwIEX9MS9V6yCtXvWn6r5ldcHWnQDixxgZ5jQ05micq0XxuvRz3M937Ftlb84H 4vrksfLUmh2xuqU/SyQmUsE1zjA404Sathszb2uCr6DW5kSIhXCXtRyCO9viVxCqjp gigOIuoHt+lPg== 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 5/5] Docs/admin-guide/mm/damon/usage: fix wrong quotas diabling condition Date: Fri, 16 Feb 2024 16:58:42 -0800 Message-Id: <20240217005842.87348-6-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After the introduction of DAMOS quotas, DAMOS quotas is not disabled if both size and time quotas are zero but the quota goal is set. The new rule is also applied to DAMON sysfs interface, but the usage doc is not updated. Update it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index fefe62e0a466..db6620b5bc0a 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -329,7 +329,8 @@ respectively. Then, DAMON tries to use only up to ``ti= me quota`` milliseconds for applying the ``action`` to memory regions of the ``access_pattern``, a= nd to apply the action to only up to ``bytes`` bytes of memory regions within the ``reset_interval_ms``. Setting both ``ms`` and ``bytes`` zero disables the -quota limits. +quota limits unless at least one :ref:`goal ` is +set. =20 Under ``weights`` directory, three files (``sz_permil``, ``nr_accesses_permil``, and ``age_permil``) exist. --=20 2.39.2