From nobody Mon May 25 01:13:03 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 343D42DAFCB; Wed, 20 May 2026 01:21:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240084; cv=none; b=oTUmatwpqvSzSwSOHsET7KItijmn0VtpMbsEJE+KU47A32neb8yKn2znikaT6v7m+rXmW9iGYGNwRucQSRHY7HT7QukvcPJG7dkl3tPU7jALWf7HnFOu3H2rkN9sIMZ5xWD+D8xEuYHpeczuzoBvoDc4N+iVyN12w9tn+Ai+JmE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240084; c=relaxed/simple; bh=VxKAY8G6HfryxouteZadvvsvvpIuMf8k09GQVvNdGjs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PSuTw+KbrADKXLuIdETzEGEtfDtZLlNmXo6y15TwP03E7KT3sv5Yyakpicp/2HZUlTbY/z1Z9xP3Kc/TqaPElDYnQ/MwM8X1X4kZ7bB3xIli4nC5qHpveP2QjZsrS69WYB06FlgfzkbV2+n9N+diK15uH8PFx1D2RWpRTucg2jQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qvg0o9xc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qvg0o9xc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72D931F00899; Wed, 20 May 2026 01:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779240083; bh=pgoNqW5Lq/igHId1rBXMsCtJD4xKs309svvL4MmZKcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Qvg0o9xcRwy9rQSrFDKwUfsPvVEHvHTNAdTgw10Ga6b8J4VdNU54ucd2H7Ezszy8U +iyIiWdJG158/ueAgWdt6NVUuAuy/4u7g9R8t3VDtUi70RSSSaFveS07Df1v1mINQL BMXOiLzhSWb+tug/5COqbpWoi7n2EsdUo09hljbxV8FDo6tjGrDzVSLVX9x0fF9FiB /Yv27l2dIHRK404dWFF18A2X8WYrmyesdMmcpZcUWc460Sk+Q7vbX9PcqjjUDCzDKC reY9/X89D0IPSKwv5UEudrB7HARS/1K5CIGI4x9COqJSe73mh8ZEfowqIxm7dWMMdP qMpzSfif+moyQ== From: SeongJae Park To: Andrew Morton Cc: niecheng , SeongJae Park , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH RESEND 1/3] mm/damon/core: clarify next_intervals_tune_sis update path Date: Tue, 19 May 2026 18:20:59 -0700 Message-ID: <20260520012104.93602-2-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260520012104.93602-1-sj@kernel.org> References: <20260520012104.93602-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" From: niecheng damon_set_attrs() updates next_aggregation_sis and next_ops_update_sis for online attrs updates, but it does not update next_intervals_tune_sis there. This can look like a missing update when reading damon_set_attrs() alone, while next_intervals_tune_sis is actually updated in kdamond_fn(). Add a short comment to make this explicit. Suggested-by: SeongJae Park Signed-off-by: niecheng Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park Reviewed-by: and Acked-by: tags collection, and rebasing to latest --- Changes from v2 - v2: https://lore.kernel.org/D3B0C1F5BB6ADCE4+20260514163751.3399513-1-nie= cheng1@uniontech.com - Collect Reviewed-by: tag. - Rebase to latest mm-new. Changes from v1 - v1: https://lore.kernel.org/7946CE4E0773AEF7+20260514074846.3258908-1-nie= cheng1@uniontech.com - Keep the behavior and clarify it instead. mm/damon/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/damon/core.c b/mm/damon/core.c index 4e223857a0f99..68b3b4bbc8fc9 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -909,6 +909,9 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon= _attrs *attrs) attrs->aggr_interval / sample_interval; ctx->next_ops_update_sis =3D ctx->passed_sample_intervals + attrs->ops_update_interval / sample_interval; + /* + * next_intervals_tune_sis will be updated inside kdamond_fn(). + */ =20 damon_update_monitoring_results(ctx, attrs, aggregating); ctx->attrs =3D *attrs; --=20 2.47.3 From nobody Mon May 25 01:13:03 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 84A1E2DF719; Wed, 20 May 2026 01:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240085; cv=none; b=Eh/rXgZzXa3e+x7BrBAiqCyAf7FgiiuAuG18sMGYcn0j6FoQQIYxcCvv5sy25HumE8Ki8Nl1341bWnlH3EQhSlu66RIDhTDXQnrH57rvA1L+3hmBYohV1+Yl0T19I1+67HIfvHS2N/lvRqTSZNS3UysMBTweP0RyCNH7kBv7Nk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240085; c=relaxed/simple; bh=pnGDXvd7RBcHHrxe6ZCdktDvhj8f7041d9RlsNx4PJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q4UOLEULhkqk0/biPulHwCoxeYNdjulmpR1aHKrPGKLEtdFmeAWoyHTNpF8pZUet/PkqzBnXqOXF7mzmpETAAJxoZyN5W87gxaJrOdqNAVveN0HwXvO/WsdpbmQ5WpC24PBFxVmWdiS1vPJPwuUvLQdTGrd3Hc2lOGXmvI7DAnI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m8C90cYh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m8C90cYh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F0671F00894; Wed, 20 May 2026 01:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779240084; bh=8DIDlUu8aFd2dbl3UTvG+BWXcnjPd+VsOywP93qiOuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=m8C90cYhbtNtnQjxj3IDNo0d3iQhHzuQC2kF9hEyB4hjs/vc1cfJkyfVFm9/wa9t2 X9tChHOu3vN8T+EPmRMuCmVYIcEizWz0vAz8BG5LnegqOdlHQ9Vu1JVPBZP+JwOhde CGxKxWUrhnAPlVmnuNRNgryETukOJCg+Ilag2eB8fyrQ2ESF119upzvXAeOzgRDkeE iy0zHqMLvdwfHFGguUs4pWh9Y2gZWKzS8dbFgFl27dYzM0nBGl9iD7SCTy2ds3ziTY tarG8cdr03rP+4QLD388y6sBItezOma/hL9Eq0YdqYJda1ov/wv+WQ1eK+G+ql/cGe 1DCeRzKfoFrnw== From: SeongJae Park To: Andrew Morton Cc: Sakurai Shun , "Liam R. Howlett" , David Hildenbrand , Jonathan Corbet , Lorenzo Stoakes , Michal Hocko , Mike Rapoport , SeongJae Park , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , damon@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH RESEND 2/3] Docs/mm/damon/design: fix three typos Date: Tue, 19 May 2026 18:21:00 -0700 Message-ID: <20260520012104.93602-3-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260520012104.93602-1-sj@kernel.org> References: <20260520012104.93602-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" From: Sakurai Shun L140: "unsinged" -> "unsigned" L371: "sampleing" -> "sampling" L387: "multipled" -> "multiplied" Signed-off-by: Sakurai Shun Reviewed-by: Lorenzo Stoakes Acked-by: Mike Rapoport (Microsoft) Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park Reviewed-by: and Acked-by: tags collection, and rebasing to latest --- Changes from v2 - v2: https://lore.kernel.org/20260517073433.3015-1-ssh1326@icloud.com - Collect Reviewed-by: and Acked-by: tags. - Update commit subject prefix. - Rebase to latest mm-new. Changes from v1 - v1: https://lore.kernel.org/20260516093552.8404-1-cheesecake2960@icloud.c= om - Use real author name. Documentation/mm/damon/design.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index a24f9f00d1837..2da7ca0d3d17a 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -147,7 +147,7 @@ as Idle page tracking does. Address Unit ------------ =20 -DAMON core layer uses ``unsinged long`` type for monitoring target address +DAMON core layer uses ``unsigned long`` type for monitoring target address ranges. In some cases, the address space for a given operations set could= be too large to be handled with the type. ARM (32-bit) with large physical address extension is an example. For such cases, a per-operations set @@ -417,7 +417,7 @@ with theoretical maximum ``nr_accesses``, which can be = calculated as ``aggregation interval / sampling interval``. =20 The mechanism calculates the ratio of access events for ``aggrs`` aggregat= ions, -and increases or decrease the ``sampleing interval`` and ``aggregation +and increases or decrease the ``sampling interval`` and ``aggregation interval`` in same ratio, if the observed access ratio is lower or higher = than the target, respectively. The ratio of the intervals change is decided in proportion to the distance between current samples ratio and the target ra= tio. @@ -433,7 +433,7 @@ The tuning is turned off by default, and need to be set= explicitly by the user. As a rule of thumbs and the Parreto principle, 4% access samples ratio tar= get is recommended. Note that Parreto principle (80/20 rule) has applied twic= e. That is, assumes 4% (20% of 20%) DAMON-observed access events ratio (sourc= e) -to capture 64% (80% multipled by 80%) real access events (outcomes). +to capture 64% (80% multiplied by 80%) real access events (outcomes). =20 To know how user-space can use this feature via :ref:`DAMON sysfs interface `, refer to :ref:`intervals_goal --=20 2.47.3 From nobody Mon May 25 01:13:03 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2DD2A2E2F1F; Wed, 20 May 2026 01:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240086; cv=none; b=C5bNTQHldqLTc5gbEl06NxDT4jSIXyuKxNowpRJcl/Y/ju5tU7FZbXtPK7b9LBzLB3iry/bczn9g3VSGA7N6LFbyQ89DZ66CSdHJ3EmqzCB12BqxDGKf9toNFClYcyDbg9sjC3KPAYC9hiDw325z4Y3KWxnV4jUEiISKEV+byDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779240086; c=relaxed/simple; bh=+08MHU28qO1q0LHSMCgNkl884KAY47ubATRBlMdBI7E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HmH/qxI8kP0qWjgfvqt5xiyV3uOvBbVVkmYX4R/YFESRw+BuSzeohoCQT+zu6gjTsRgN6pv9kXKAmBkOUK9rUdVQmz4nMtn3E0EPWo7E0zkCMdgeYNtG8dwYAYBsgnI6s7gbmqTXezkk638moyiYbQZPVls+HFbSy2+0mujk45s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DMZT4khY; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DMZT4khY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58DE41F00896; Wed, 20 May 2026 01:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779240085; bh=g5SUdvctEA/oc8IEKBcOiY6OqbBfPvmo8ZaU8y8FY94=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DMZT4khYbL3aVRqpSOJtNVRlGSXVDkWy1zEBu++LgurjzZELzjwQDXrgRzBwBHMIK UCWteVanQ2vhP4Ol10ibWnCkC9nQIvwNUNllXshjXRe38hn2df2u5d0/oDB8UxM4QT D3wUN5aw075C59UpGegQRCqJIkJSk0zmcjkxGzyI4snr9r0lRzwQ5nS9UUnREz8XXx c8zeDtLpZzBCVxVangUULH0Q+UoQRvgYRPXDwl1GbcZ/EiMfi1fJHw6OGkNuomjFjl S77eIOaNN9zjRUSFfBB6IRfyAXJkBxVSEkMzbdfQt5eeNr4oFHtZvqwcjxwmqyHV/j 11/ezJpP0UEQA== From: SeongJae Park To: Andrew Morton Cc: Zenghui Yu , "Liam R. Howlett" , David Hildenbrand , Jonathan Corbet , Lorenzo Stoakes , Michal Hocko , Mike Rapoport , SeongJae Park , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , damon@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH RESEND 3/3] Docs/{ABI,admin-guide}/damon: fix various typoes Date: Tue, 19 May 2026 18:21:01 -0700 Message-ID: <20260520012104.93602-4-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260520012104.93602-1-sj@kernel.org> References: <20260520012104.93602-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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Zenghui Yu ``damon_target_idx`` was wrongly written as ``target_idx`` in the docs. Fix it all over the place, as well as the wrong directory count, grammar, etc. Signed-off-by: Zenghui Yu Reviewed-by: SeongJae Park Signed-off-by: SeongJae Park Reviewed-by: and Acked-by: tags collection, and rebasing to latest --- Changes from v1 - v1: https://lore.kernel.org/20260517182624.7167-1-zenghui.yu@linux.dev - Collect Reviewed-by: tag. - Rebase to latest mm-new. .../ABI/testing/sysfs-kernel-mm-damon | 2 +- Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentatio= n/ABI/testing/sysfs-kernel-mm-damon index ee29d4e204ffa..b73e6bc28ea5f 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -452,7 +452,7 @@ Description: If 'hugepage_size' is written to the 'type= ' file, writing to or reading from this file sets or gets the maximum size of the hugepage for the filter. =20 -What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//co= re_filters//target_idx +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//co= re_filters//damon_target_idx Date: Feb 2025 Contact: SeongJae Park Description: If 'target' is written to the 'type' file, writing to or diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 0d6a27dc97b0a..d46875e603d86 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -97,7 +97,7 @@ comma (","). =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 0/target_metric,target_value,current_value,nid,path =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = :ref:`watermarks `/metric,interval_us,high,mid,low =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = :ref:`{core_,ops_,}filters `/nr_filters - =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 0/type,matching,allow,memcg_path,addr_start,addr_end,target_idx,m= in,max + =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 0/type,matching,allow,memcg_path,addr_start,addr_end,damon_target= _idx,min,max =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = :ref:`dests `/nr_dests =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 0/id,weight =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = :ref:`stats `/nr_tried,sz_tried,nr_applied,sz_applied,= sz_ops_filter_passed,qt_exceeds,nr_snapshots,max_nr_snapshots @@ -374,7 +374,7 @@ to ``N-1``. Each directory represents each DAMON-based= operation scheme. schemes// ------------ =20 -In each scheme directory, eight directories (``access_pattern``, ``quotas`= `, +In each scheme directory, nine directories (``access_pattern``, ``quotas``, ``watermarks``, ``core_filters``, ``ops_filters``, ``filters``, ``dests``, ``stats``, and ``tried_regions``) and three files (``action``, ``target_ni= d`` and ``apply_interval``) exist. @@ -492,7 +492,7 @@ given DAMON-based operation scheme. Under the watermarks directory, five files (``metric``, ``interval_us``, ``high``, ``mid``, and ``low``) for setting the metric, the time interval between check of the metric, and the three watermarks exist. You can set = and -get the five values by writing to the files, respectively. +get the five values by writing to and reading from the files, respectively. =20 Keywords and meanings of those that can be written to the ``metric`` file = are as below. @@ -500,7 +500,7 @@ as below. - none: Ignore the watermarks - free_mem_rate: System's free memory rate (per thousand) =20 -The ``interval`` should written in microseconds unit. +The ``interval_us`` should be written in microseconds unit. =20 .. _sysfs_filters: =20 @@ -528,9 +528,9 @@ in the numeric order. =20 Each filter directory contains nine files, namely ``type``, ``matching``, ``allow``, ``memcg_path``, ``addr_start``, ``addr_end``, ``min``, ``max`` -and ``target_idx``. To ``type`` file, you can write the type of the filte= r. -Refer to :ref:`the design doc ` for available = type -names, their meaning and on what layer those are handled. +and ``damon_target_idx``. To ``type`` file, you can write the type of the +filter. Refer to :ref:`the design doc ` for +available type names, their meaning and on what layer those are handled. =20 For ``memcg`` type, you can specify the memory cgroup of the interest by writing the path of the memory cgroup from the cgroups mount point to @@ -540,7 +540,7 @@ files, respectively. For ``hugepage_size`` type, you c= an specify the minimum and maximum size of the range (closed interval) to ``min`` and ``max`` fil= es, respectively. For ``target`` type, you can specify the index of the target between the list of the DAMON context's monitoring targets list to -``target_idx`` file. +``damon_target_idx`` file. =20 You can write ``Y`` or ``N`` to ``matching`` file to specify whether the f= ilter is for memory that matches the ``type``. You can write ``Y`` or ``N`` to @@ -731,7 +731,7 @@ show results using tracepoint supporting tools like ``p= erf``. For example:: =20 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 +(``target_id=3DX``) shows the id 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 --=20 2.47.3