From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D85EEEE14D3 for ; Thu, 7 Sep 2023 02:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240287AbjIGC3n (ORCPT ); Wed, 6 Sep 2023 22:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjIGC3m (ORCPT ); Wed, 6 Sep 2023 22:29:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95FE519A0; Wed, 6 Sep 2023 19:29:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B71ABC433C9; Thu, 7 Sep 2023 02:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053778; bh=+IqrUHwg2Fad6cIIwKzoX0FcbTzdrwz+hio0MOPrv5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AsOlxP5a2voHFqvcPXAprrlsyv3GaIQgNIogoaQ4+Hmsfl/P8G7laywwqsD3jEOt2 gdwGsJwzcfQbKU+LiCOw4he3yX1Uwy/hSjOMt4r6BkQqwZpdjo74Mfk3njTwNdGPgY hrLRQBbiAo9XZvp6VU1rvKAp5+hTF2Vk+PWz9zhnJFgON14NW2o0aG/Hnz38HRXEks 9FEyjNy+rO8BUMugU0TM93xwBKB2MmRBlMgYlgJ+q7Rp43OOVwTP/Az2crLmw0Sb/m SZ3oLq0US685pFT1kaBvWoLHhVrRtzbyuyhjMHplJLIUS4c5sWdpbN3WaYeNCMJd3y ydV0f5sQAeJsA== 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 01/11] Docs/admin-guide/mm/damon/usage: fixup missed :ref: keyword Date: Thu, 7 Sep 2023 02:29:19 +0000 Message-Id: <20230907022929.91361-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" A cross-link reference in DAMON usage document is missing ':ref:' Sphynx keyword. Fix it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 8da1b7281827..834eefe39650 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -392,7 +392,7 @@ pages of all memory cgroups except ``/having_care_alrea= dy``.:: echo N > 1/matching =20 Note that ``anon`` and ``memcg`` filters are currently supported only when -``paddr`` `implementation ` is being used. +``paddr`` :ref:`implementation ` is being used. =20 Also, memory regions that are filtered out by ``addr`` or ``target`` filte= rs are not counted as the scheme has tried to those, while regions that filte= red --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 193E7EE14DA for ; Thu, 7 Sep 2023 02:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241807AbjIGC3o (ORCPT ); Wed, 6 Sep 2023 22:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240065AbjIGC3n (ORCPT ); Wed, 6 Sep 2023 22:29:43 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BA219A6; Wed, 6 Sep 2023 19:29:39 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756FAC433CA; Thu, 7 Sep 2023 02:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053779; bh=ddAwo+PJ4HbDbLRCVex0LmwHXE3nv9K1631hg64QSQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P13xdxS4wlGAVIBUe5kpWPR/UNmFyYTU4FLLLMcCHrKh3uUJ1xUCoyNRngufVl8B/ VvJ+If3uwJfzB71IHKAUD238aAFRPRvh8Uc+23igy+x6rguGNyGfpt4cIiqz/Rwyvo cdqrwQY0g6DFBeJuVmSoMlAdEBwMPPBXGOpAGZSZW9CAoGUbfGNuZuucH6JmAOaim5 xFvqb7c55zEtR86oxNiJVzFYZMGAV/FfX8LJYvMggb+uNfja4GUtBfiHvpAUH9XBdL 2bsLXJNCa0vHIZ7Ef6iRQ0I/ijEwT0vn62cEXBrYQpc4PQITTO9myhuqgpaT2/1QB8 suwu4x18IKU/A== 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 02/11] Docs/admin-guide/mm/damon/usage: place debugfs usage at the bottom Date: Thu, 7 Sep 2023 02:29:20 +0000 Message-Id: <20230907022929.91361-3-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" debugfs interface is deprecated. Put it at the bottom of the document so that readers have less chances to read it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 39 ++++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 834eefe39650..bffe9dd9b0d6 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -495,6 +495,25 @@ Please note that it's highly recommended to use user s= pace tools like `damo `_ rather than manually reading and writi= ng the files as above. Above is only for an example. =20 +.. _tracepoint: + +Tracepoint for Monitoring Results +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + +Users can get the monitoring results via the :ref:`tried_regions +` or a tracepoint, ``damon:damon_aggregated``. +While the tried regions directory is useful for getting a snapshot, the +tracepoint is useful for getting a full record of the results. While the +monitoring is turned on, you could record the tracepoint events and show +results using tracepoint supporting tools like ``perf``. For example:: + + # echo on > monitor_on + # perf record -e damon:damon_aggregated & + # sleep 5 + # kill 9 $(pidof perf) + # echo off > monitor_on + # perf script + .. _debugfs_interface: =20 debugfs Interface (DEPRECATED!) @@ -790,23 +809,3 @@ directory by putting the name of the context to the ``= rm_contexts`` file. :: =20 Note that ``mk_contexts``, ``rm_contexts``, and ``monitor_on`` files are i= n the root directory only. - - -.. _tracepoint: - -Tracepoint for Monitoring Results -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D - -Users can get the monitoring results via the :ref:`tried_regions -` or a tracepoint, ``damon:damon_aggregated``. -While the tried regions directory is useful for getting a snapshot, the -tracepoint is useful for getting a full record of the results. While the -monitoring is turned on, you could record the tracepoint events and show -results using tracepoint supporting tools like ``perf``. For example:: - - # echo on > monitor_on - # perf record -e damon:damon_aggregated & - # sleep 5 - # kill 9 $(pidof perf) - # echo off > monitor_on - # perf script --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C663EE14D9 for ; Thu, 7 Sep 2023 02:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241825AbjIGC3p (ORCPT ); Wed, 6 Sep 2023 22:29:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240631AbjIGC3n (ORCPT ); Wed, 6 Sep 2023 22:29:43 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3112719A8; Wed, 6 Sep 2023 19:29:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4271BC43391; Thu, 7 Sep 2023 02:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053779; bh=DPwXZPd8fZ7k76FJchCmgeNiFjKUbh+BZTC85e+typU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VfeGOqRlnm1Nvu7Y2kpqlsGEtfB0Kla59hAm6h5Y/p0nAKX8Y+yr52/mK2U5nrH+2 hfS//w3W7c4ET/DXTDnly0qtrnvotoU8irI8jZt6PdrASx/nf/QCHupesbiS82wbFj KiEcIUhAXFG2uDrfO7LiMuLy2Rl8udgQmP0xafcIhBpkH7aY7lDryUSN0oIFlsieQ6 w46kYv6osQmpIdkqCMMZ7FT6hb0JL4NY4ZUNEszYWhQrH29kzmKstStqhSqFr9tdTC teVpDaZxwOf9lyI69y4dN4BLbnN/YZPQNcQueIoGSoDt4n070hfVug2XT9bl33UsZ8 IXUNAIM0JHyvA== 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 03/11] Docs/admin-guide/mm/damon/usage: move debugfs intro to the bottom of the section Date: Thu, 7 Sep 2023 02:29:21 +0000 Message-Id: <20230907022929.91361-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On the DAMON usage introduction section, the introduction of DAMON debugfs interface, which is deprecated, is above kernel API, which is actively supported. Move the DAMON debugfs intro to bottom, so that readers have less chances to read it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index bffe9dd9b0d6..e48101c777e1 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -20,18 +20,18 @@ DAMON provides below interfaces for different users. you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The `DAMON user space tool `_ is one example of such programs. -- *debugfs interface. (DEPRECATED!)* - :ref:`This ` is almost identical to :ref:`sysfs inter= face - `. This is deprecated, so users should move to the - :ref:`sysfs interface `. If you depend on this and can= not - move, please report your usecase to damon@lists.linux.dev and - linux-mm@kvack.org. - *Kernel Space Programming Interface.* :doc:`This ` is for kernel space programmers. Using this, users can utilize every feature of DAMON most flexibly and efficiently by writing kernel space DAMON application programs for you. You can even e= xtend DAMON for various address spaces. For detail, please refer to the inter= face :doc:`document `. +- *debugfs interface. (DEPRECATED!)* + :ref:`This ` is almost identical to :ref:`sysfs inter= face + `. This is deprecated, so users should move to the + :ref:`sysfs interface `. If you depend on this and can= not + move, please report your usecase to damon@lists.linux.dev and + linux-mm@kvack.org. =20 .. _sysfs_interface: =20 --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D0D2EE14DC for ; Thu, 7 Sep 2023 02:29:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243734AbjIGC3r (ORCPT ); Wed, 6 Sep 2023 22:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241928AbjIGC3o (ORCPT ); Wed, 6 Sep 2023 22:29:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DE119A6; Wed, 6 Sep 2023 19:29:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0184BC433C7; Thu, 7 Sep 2023 02:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053780; bh=EttCSXcWQaBCLpMduSaDVf+bO6xFKw8ChvQvuGULuQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ohoS0Q5NTqWvbTzBXP57Dq2ofbn2QBljXe1cpT6j4lRuQzRB3V3WC0/jjWNW9zKsh Pj0L+aNe9DpvOK+7f35EDNXepLHd2afINFwGotsGZrvFObI/8v0cnnEYpBOI2JUYmH /zr4DyQSRbrTK5dB2xtxZlxJVBO3UwjdbgcXEKRHJ7oe+HD6kjIPk8WJR4qzpiLMez orXkcK9BjJfpw0WtGMGlpGtkR3tkbB/jErb9/Dcmbg7Npz4s11Z0ecchpXsRgN5L5M t0gpXfrIaxSegMGSQeogKMEwEIC3I5l9+WKq0T+o70jZ9Bez1OALFBaPB6txHNOCkN ks7bnKiPNy1Vg== 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 04/11] Docs/mm/damon/design: explicitly introduce ``nr_accesses`` Date: Thu, 7 Sep 2023 02:29:22 +0000 Message-Id: <20230907022929.91361-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The design document is explaining about the access tracking mechanism and the access rate counter (nr_accesses), but not directly mentions the name. Add a sentence for making it clear. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index a20383d01a95..5c465835a44f 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -163,9 +163,10 @@ assumption (pages in a region have the same access fre= quencies) is kept, only one page in the region is required to be checked. Thus, for each ``sampli= ng interval``, DAMON randomly picks one page in each region, waits for one ``sampling interval``, checks whether the page is accessed meanwhile, and -increases the access frequency of the region if so. Therefore, the monito= ring -overhead is controllable by setting the number of regions. DAMON allows u= sers -to set the minimum and the maximum number of regions for the trade-off. +increases the access frequency counter of the region if so. The counter is +called ``nr_regions`` of the region. Therefore, the monitoring overhead is +controllable by setting the number of regions. DAMON allows users to set = the +minimum and the maximum number of regions for the trade-off. =20 This scheme, however, cannot preserve the quality of the output if the assumption is not guaranteed. --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBEE1EE14DA for ; Thu, 7 Sep 2023 02:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244982AbjIGC3u (ORCPT ); Wed, 6 Sep 2023 22:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242124AbjIGC3p (ORCPT ); Wed, 6 Sep 2023 22:29:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62EA519B0; Wed, 6 Sep 2023 19:29:41 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3E37C433C9; Thu, 7 Sep 2023 02:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053781; bh=/4c0bNqammeumkz0XhdEYekAGWITk+eiJUgJ8I1y+iI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1aBIvrVp1OYAQpfz00zRovXOneOesmUDSZyTevcK820XKsGAeBqVz+uKLkcn19ia t6iRL/0aRlSuwJh0x/3UVFXNGwBKDRIioHx4gYhpYlanDqU5oNeS/uQo/0Kf0FYlTn yHWjH8sqOnKWJtQ8ZXjS0fEpJY2oDw3OKXbcwx4Q8uXajUh3jhQ00R6lMX83jpsFLU 7qB3XGpSq8hnVEiIUFzsOtdQuhLHqy8onWed+iUqj13gYcdnfp+m/ndsdEmepn6P66 SD0M9Ouci60A3Zf8RhsozItBrOl647bJks1M3TsZTbi3TpBkLEJgMaWCHyNU2RtBuS owRht7VtaeJcQ== 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 05/11] Docs/admin-guide/mm/damon/usage: explain the format of damon_aggregate tracepoint Date: Thu, 7 Sep 2023 02:29:23 +0000 Message-Id: <20230907022929.91361-6-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The example of the section for damon_aggregated tracepoint is not explaining how the output looks like, and how it can be interpreted. Add it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 14 ++++++++++++++ Documentation/mm/damon/design.rst | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index e48101c777e1..758575d33ab6 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -513,6 +513,20 @@ results using tracepoint supporting tools like ``perf`= `. For example:: # kill 9 $(pidof perf) # echo off > monitor_on # perf script + kdamond.0 46568 [027] 79357.842179: damon:damon_aggregated: target_id= =3D0 nr_regions=3D11 122509119488-135708762112: 0 864 + [...] + +Each line of the perf script output represents each monitoring region. The +first five fields are as usual other tracepoint outputs. The sixth field +(``target_id=3DX``) shows the ide of the monitoring target of the region. = The +seventh field (``nr_regions=3DX``) shows the total number of monitoring re= gions +for the target. The eighth field (``X-Y:``) shows the start (``X``) and e= nd +(``Y``) addresses of the region in bytes. The ninth field (``X``) shows t= he +``nr_accesses`` of the region (refer to +:ref:`design ` for more details of the +counter). Finally the tenth field (``X``) shows the ``age`` of the region +(refer to :ref:`design ` for more details of the +counter). =20 .. _debugfs_interface: =20 diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 5c465835a44f..51aab9b0621a 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -154,6 +154,8 @@ The monitoring overhead of this mechanism will arbitrar= ily increase as the size of the target workload grows. =20 =20 +.. _damon_design_region_based_sampling: + Region Based Sampling ~~~~~~~~~~~~~~~~~~~~~ =20 @@ -191,6 +193,8 @@ In this way, DAMON provides its best-effort quality and= minimal overhead while keeping the bounds users set for their trade-off. =20 =20 +.. _damon_design_age_tracking: + Age Tracking ~~~~~~~~~~~~ =20 --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2360DEE14D3 for ; Thu, 7 Sep 2023 02:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245053AbjIGC3w (ORCPT ); Wed, 6 Sep 2023 22:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243060AbjIGC3p (ORCPT ); Wed, 6 Sep 2023 22:29:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 336F51BC1; Wed, 6 Sep 2023 19:29:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73D10C433CC; Thu, 7 Sep 2023 02:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053782; bh=nX+lBCNxvHlh2Hd6gi4Ol2YBYOd7nIVtVx3JTRH4uq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I9w1kxv9RA186Id0zHiS1zj+BAWURWAM5lFzFwxGnAFkbOzT+alc0bJOmHHWt8jct Q4jtNAkHhp+5IA6yHicRT3lr/mvEFKowHjn869YNnj4WhXTR6m9pryGxMT2+ME1DTC DMptSU91rd7c6N4zVxIIoXhw+QDzsyi0AO1xQdEgloEG1ovEnYjbJyUsoo6s74QWSp beuyoPPwVNVq+pc8howL9hkKWIUO3KAdpEzIpzs3Hhu0WBQMaGsAOnUtSDLvDS21uK qwRvMdnKNG7PeimG83FzH02OCX+LD3nmd+vZ0CUO8eRiFMPYGbJ+Ekra1waYsgazYV Kr6xv4L++j1iw== 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 06/11] Docs/mm/damon/design: add a section for kdamond and DAMON context Date: Thu, 7 Sep 2023 02:29:24 +0000 Message-Id: <20230907022929.91361-7-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The design document is not explaining about the concept of kdamond and the DAMON context, while usage document does. Those concept explanation should be in the design document, and usage document should link those. Add a section for those. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 51aab9b0621a..ee099d45fea8 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -476,3 +476,13 @@ modules for proactive reclamation and LRU lists manipu= lation are provided. For more detail, please read the usage documents for those (:doc:`/admin-guide/mm/damon/reclaim` and :doc:`/admin-guide/mm/damon/lru_sort`). + + +Execution Model and Data Structures +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The monitoring-related information including the monitoring request +specification and DAMON-based operation schemes are stored in a data struc= ture +called DAMON ``context``. DAMON executes each context with a kernel thread +called ``kdamond``. Multiple kdamonds could run in parallel, for different +types of monitoring. --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF8E7EE14D8 for ; Thu, 7 Sep 2023 02:29:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244937AbjIGC3y (ORCPT ); Wed, 6 Sep 2023 22:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243335AbjIGC3q (ORCPT ); Wed, 6 Sep 2023 22:29:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A2A171F; Wed, 6 Sep 2023 19:29:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34969C433CA; Thu, 7 Sep 2023 02:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053782; bh=M64Pfxcjf04QA6IY4mZMjdI8QQdmOQDItlzxRcwz4LQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MVm2PfWXGzcgo0kBxY/8/P25MQuwXf2YFzHZmudczea0VOOSzggdox8oqOLX3u4Nr ZlZHTblD7l+UcOvhoYenzWvOLWWxJslj5dYbFGfNz0oN3B81Pcxt+aPPDKmI6jrtMo YllggfJnHAK1A1kkPPl/wWO7P2zWYpBc1Pe//JP9NYo6K6Q70bKcUnlzBrImIpv2NS izprI02tEPyUMz1Hfpctj6gMDM09k49HVu5q+X2frB82M8+ahs+8gOQpnkbrxSw5zm Qkvh9AomlCBXMtNeaCR/vzEj0YIX85F7RxK58U3UuYr+LD8Mxn/OkeIaAZNfHgvaPS MjJ6rWY4ilFKQ== 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 07/11] Docs/admin-guide/mm/damon/usage: link design doc for details of kdamond and context Date: Thu, 7 Sep 2023 02:29:25 +0000 Message-Id: <20230907022929.91361-8-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The explanation of kdamond and context is duplicated in the design and the usage documents. Replace that in the usage with links to those in the design document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 19 +++++++++---------- Documentation/mm/damon/design.rst | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 758575d33ab6..282062b6f134 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -105,14 +105,12 @@ having the root permission could use this directory. kdamonds/ --------- =20 -The monitoring-related information including request specifications and re= sults -are called DAMON context. DAMON executes each context with a kernel thread -called kdamond, and multiple kdamonds could run in parallel. - Under the ``admin`` directory, one directory, ``kdamonds``, which has file= s for -controlling the kdamonds exist. In the beginning, this directory has only= one -file, ``nr_kdamonds``. Writing a number (``N``) to the file creates the n= umber -of child directories named ``0`` to ``N-1``. Each directory represents ea= ch +controlling the kdamonds (refer to +:ref:`design ` for more +details) exists. In the beginning, this directory has only one file, +``nr_kdamonds``. Writing a number (``N``) to the file creates the number = of +child directories named ``0`` to ``N-1``. Each directory represents each kdamond. =20 kdamonds// @@ -150,9 +148,10 @@ kdamonds//contexts/ =20 In the beginning, this directory has only one file, ``nr_contexts``. Writ= ing a number (``N``) to the file creates the number of child directories named as -``0`` to ``N-1``. Each directory represents each monitoring context. At = the -moment, only one context per kdamond is supported, so only ``0`` or ``1`` = can -be written to the file. +``0`` to ``N-1``. Each directory represents each monitoring context (refe= r to +:ref:`design ` for more +details). At the moment, only one context per kdamond is supported, so on= ly +``0`` or ``1`` can be written to the file. =20 .. _sysfs_contexts: =20 diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index ee099d45fea8..18e9b42673f8 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -478,6 +478,8 @@ more detail, please read the usage documents for those :doc:`/admin-guide/mm/damon/lru_sort`). =20 =20 +.. _damon_design_execution_model_and_data_structures: + Execution Model and Data Structures =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A9D9EE14D3 for ; Thu, 7 Sep 2023 02:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245066AbjIGC34 (ORCPT ); Wed, 6 Sep 2023 22:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243488AbjIGC3q (ORCPT ); Wed, 6 Sep 2023 22:29:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7474F19A8 for ; Wed, 6 Sep 2023 19:29:43 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E90E7C433D9; Thu, 7 Sep 2023 02:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053783; bh=ey6ldgAd6VTxnRDoPtCtQlr0A3IAnRC6k78ku2lztFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o5w62vS3iAkNVuzYgY9bfNL4wHOb5z8v2SB71t6EVqtoa8SA11fQws6liGofafFMo p8YQONgSgi2PrcMcx4kRPKTnnkIXVq+T1F6uLipVw79Q83LbAwU6y0a0xAjmmGBI3a Qy/07A+eOLSlFgEP0sKXQqwPmigbHXrm0JGjzBbAuJbX2SriKrQ8PW+HGJDuIDIalY G+kkyD7yTeSglfm6B5Wt3S064RhYrOztpWqbp1us/4OowA0TWkqW/8E63Ooa6Hxefr 66k8OkJbNqIzn+YiAzcNVQcfgU1rLO034hJIKGrtYOYB0QvlE4wLe6a4gGRCytSnCj Mhm23vrRe1GgQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] mm/damon/core: fix a comment about damon_set_attrs() call timings Date: Thu, 7 Sep 2023 02:29:26 +0000 Message-Id: <20230907022929.91361-9-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The comment on damon_set_attrs() says it should not be called while the kdamond is running, but now some DAMON modules like sysfs interface and DAMON_RECLAIM call it from after_aggregation() and/or after_wmarks_check() callbacks for online tuning. Update the comment. Signed-off-by: SeongJae Park --- mm/damon/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 28c7c49882d3..1ce483a3c2b5 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -570,7 +570,11 @@ static void damon_update_monitoring_results(struct dam= on_ctx *ctx, * @ctx: monitoring context * @attrs: monitoring attributes * - * This function should not be called while the kdamond is running. + * This function should be called while the kdamond is not running, or an + * access check results aggregation is not ongoing (e.g., from + * &struct damon_callback->after_aggregation or + * &struct damon_callback->after_wmarks_check callbacks). + * * Every time interval is in micro-seconds. * * Return: 0 on success, negative error code otherwise. --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B37A0EE14D4 for ; Thu, 7 Sep 2023 02:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245077AbjIGC36 (ORCPT ); Wed, 6 Sep 2023 22:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241928AbjIGC3s (ORCPT ); Wed, 6 Sep 2023 22:29:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B621BCC for ; Wed, 6 Sep 2023 19:29:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86713C433CB; Thu, 7 Sep 2023 02:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053783; bh=vRYmypXxVu4qyBFRsVgWGOXy10baQDAbK4q5Co5NXh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qlP28eTvxlZIfTv787ShyqGqsODexay16ibiTx1Diaxx+5FsRbtNpcWuURBIEOMiI MVGKGITV1obC+0nnb1wK5BP+LzyRRcd22VUneG4Do06WAlT3yR5Cd4F5A9REjPyqBs 37dj2ZaxtE7cCscAaXS3ulztigwpy2rxfNIB/MP1lbmzWgDIRBSYzFZ5uX3duR5pRS 34mSNwMpDpPDvZaq1aJb+hbu3YNtVwi4x9LJOwcXDyF89pA615ep4hmc4QbMa62sh/ HR+4gHtb2WSAAsdQ53ZSq8MRmZsVIpt6LNlSWFJHAhzOnHHSDJPv6qce6YRagf/g2j OkLTbEuTqmVSA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/11] mm/damon/core: add more comments for nr_accesses Date: Thu, 7 Sep 2023 02:29:27 +0000 Message-Id: <20230907022929.91361-10-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The comment on struct damon_region about nr_accesses field looks not sufficient. Many people actually used to ask what nr_accesses mean. There is more detailed explanation of the mechanism on the comment for struct damon_attrs, but it is also ambiguous, as it doesn't specify the name of the counter for aggregating the access check results. Make those more detailed. Signed-off-by: SeongJae Park --- include/linux/damon.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index ae2664d1d5f1..266f92b34dd2 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -43,6 +43,10 @@ struct damon_addr_range { * @list: List head for siblings. * @age: Age of this region. * + * @nr_accesses is reset to zero for every &damon_attrs->aggr_interval and= be + * increased for every &damon_attrs->sample_interval if an access to the r= egion + * during the last sampling interval is found. + * * @age is initially zero, increased for each aggregation interval, and re= set * to zero again if the access frequency is significantly changed. If two * regions are merged into a new region, both @nr_accesses and @age of the= new @@ -472,13 +476,14 @@ struct damon_callback { * regions. * * For each @sample_interval, DAMON checks whether each region is accessed= or - * not. It aggregates and keeps the access information (number of accesse= s to - * each region) for @aggr_interval time. DAMON also checks whether the ta= rget - * memory regions need update (e.g., by ``mmap()`` calls from the applicat= ion, - * in case of virtual memory monitoring) and applies the changes for each - * @ops_update_interval. All time intervals are in micro-seconds. - * Please refer to &struct damon_operations and &struct damon_callback for= more - * detail. + * not during the last @sample_interval. If such access is found, DAMON + * aggregates the information by increasing &damon_region->nr_accesses for + * @aggr_interval time. For each @aggr_interval, the count is reset. DAM= ON + * also checks whether the target memory regions need update (e.g., by + * ``mmap()`` calls from the application, in case of virtual memory monito= ring) + * and applies the changes for each @ops_update_interval. All time interv= als + * are in micro-seconds. Please refer to &struct damon_operations and &st= ruct + * damon_callback for more detail. */ struct damon_attrs { unsigned long sample_interval; --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B444EEE14D4 for ; Thu, 7 Sep 2023 02:30:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245115AbjIGCaD (ORCPT ); Wed, 6 Sep 2023 22:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244816AbjIGC3u (ORCPT ); Wed, 6 Sep 2023 22:29:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADEAB1BD0 for ; Wed, 6 Sep 2023 19:29:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24ADAC433C8; Thu, 7 Sep 2023 02:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053784; bh=4wgatm5vkHkhu7CH7xqyyNlcb3rmypBu/L3jao8ltp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XawgFLeBMRtYOs3eZvOrynqaYFsNYcVhLx4gCHHw8pi43JQBD3uHXY0KkhiTqaGT7 mNsMft8lIeEKWffka38pyw/THuXrqBK9lCxF7GSU53urAFxBy2e34GMG46ha2dtpJk A2qUWz0p0c1Q56x5p1kfVqwyGYYN2kW5IlP34dX80TZprJO/+HIeMH2b3NtgDi29EH CsivVUHp0QpYal2v7rLUMXrU+cryg6NOrdV6gUSkozYykti4rRyRVLSSjW8+u8m5H5 /NpzEaSnWhhuGqCXSw2hRbt++8Ez7+7o1gHUHZTiUEG946PnOUZkO8cEQ1zk+23TlQ omATik1sdthtw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] mm/damon/core: remove duplicated comment for watermarks-based deactivation Date: Thu, 7 Sep 2023 02:29:28 +0000 Message-Id: <20230907022929.91361-11-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The comment for explaining about watermarks-based monitoring part deactivation is duplicated in two paragraphs. Remove one. Signed-off-by: SeongJae Park --- include/linux/damon.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 266f92b34dd2..ab3089de1478 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -317,9 +317,6 @@ struct damos_access_pattern { * monitoring context are inactive, DAMON stops monitoring either, and just * repeatedly checks the watermarks. * - * If all schemes that registered to a &struct damon_ctx are inactive, DAM= ON - * stops monitoring and just repeatedly checks the watermarks. - * * Before applying the &action to a memory region, &struct damon_operations * implementation could check pages of the region and skip &action to resp= ect * &filters --=20 2.25.1 From nobody Sun Feb 8 00:27:17 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CBE1EE14C3 for ; Thu, 7 Sep 2023 02:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245081AbjIGCaB (ORCPT ); Wed, 6 Sep 2023 22:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245052AbjIGC3w (ORCPT ); Wed, 6 Sep 2023 22:29:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683341BD3; Wed, 6 Sep 2023 19:29:45 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5C04C433C9; Thu, 7 Sep 2023 02:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694053785; bh=BKOeFu7T8a2LEb2S23swx71FouyPaLhdxkSplv88jDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kW9lSKJUK8+ODGx8+zLAuwY4U8iF1ZuvoO7A+S27Q/xz6o4XPq68SwXNgzmyYnuEj 7WyyAtobo0uu9GfdSX6ATJ6HmrbwpUrlbRY76oIle3a7639PBD8FsDroWOedtlhvBJ BprdBWHVEqzGCzw1lDqWeyDNOvDtW4K3fbPjftNElyFGevEYFcZI9LzRv05kW1qN4M 6PYPngTZqKcq7sHlV9uEdLmA9k+RYmpT5Y6vpkCEZmF6/KzzVksprDIJzoQbnn7lf6 8EYD5qEPNvxsMDKaO3Nq5KDn2d3yN6qiyuRZxCJf3DJt5CLXz0xiLjdo+Z3cOkkHoo eI3cefVYuwqfg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Steven Rostedt , damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] mm/damon/core: remove 'struct target *' parameter from damon_aggregated tracepoint Date: Thu, 7 Sep 2023 02:29:29 +0000 Message-Id: <20230907022929.91361-12-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230907022929.91361-1-sj@kernel.org> References: <20230907022929.91361-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" damon_aggregateed tracepoint is receiving 'struct target *', but doesn't use it. Remove it from the prototype. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 6 +++--- mm/damon/core.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h index c79f1d4c39af..0b8d13bde17a 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -11,10 +11,10 @@ =20 TRACE_EVENT(damon_aggregated, =20 - TP_PROTO(struct damon_target *t, unsigned int target_id, - struct damon_region *r, unsigned int nr_regions), + TP_PROTO(unsigned int target_id, struct damon_region *r, + unsigned int nr_regions), =20 - TP_ARGS(t, target_id, r, nr_regions), + TP_ARGS(target_id, r, nr_regions), =20 TP_STRUCT__entry( __field(unsigned long, target_id) diff --git a/mm/damon/core.c b/mm/damon/core.c index 1ce483a3c2b5..b895f70acb2d 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -805,7 +805,7 @@ static void kdamond_reset_aggregated(struct damon_ctx *= c) struct damon_region *r; =20 damon_for_each_region(r, t) { - trace_damon_aggregated(t, ti, r, damon_nr_regions(t)); + trace_damon_aggregated(ti, r, damon_nr_regions(t)); r->last_nr_accesses =3D r->nr_accesses; r->nr_accesses =3D 0; } --=20 2.25.1