* [PATCH v2 3/3] Docs/admin-guide/mm/damon/usage: document the temporal tuner's quota limit
[not found] <20260920023111.2466265-1-donggeunyoo.kernel@gmail.com>
@ 2026-09-20 2:31 ` Donggeun Yoo
2026-09-20 10:49 ` SJ Park
0 siblings, 1 reply; 3+ messages in thread
From: Donggeun Yoo @ 2026-09-20 2:31 UTC (permalink / raw)
To: SJ Park, Andrew Morton
Cc: damon, linux-mm, linux-kernel, donggeunyoo.kernel,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Jonathan Corbet, Shuah Khan, Randy Dunlap, linux-doc
The temporal goal tuner converts the size quota into basis points in an
unsigned long, so a quotas/bytes above ULONG_MAX / 10000 does not fit,
and is handled as if no size quota were set. On 32-bit that is 429496
bytes, well below the "echo $((1024*1024*1024)) > quotas/bytes" this
document instructs. addr_unit does not raise the limit, though a larger
unit does make it harder to reach.
Note both in the goal_tuner description.
Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
---
Documentation/admin-guide/mm/damon/usage.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index ba47255448564..ea7443b307826 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -455,6 +455,13 @@ the background design of the feature and the name of the selectable algorithms.
Refer to :ref:`goals directory <sysfs_schemes_quota_goals>` for the goals
setup.
+The ``temporal`` algorithm converts the size quota into basis points, so it
+cannot represent a ``bytes`` value larger than 429496 on 32-bit kernels, or
+1844674407370955 on 64-bit ones. Larger values are handled as if no size
+quota were set. :ref:`addr_unit <damon_design_addr_unit>` does not raise the
+limit, but it does make the limit harder to reach: with a larger unit, the
+same amount of memory is written to ``bytes`` as a smaller number.
+
You can set the action-failed memory quota charging ratio by writing the
numerator and the denominator for the ratio to ``fail_charge_num`` and
``fail_charge_denom`` files, respectively. Reading those files will return the
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 3/3] Docs/admin-guide/mm/damon/usage: document the temporal tuner's quota limit
2026-09-20 2:31 ` [PATCH v2 3/3] Docs/admin-guide/mm/damon/usage: document the temporal tuner's quota limit Donggeun Yoo
@ 2026-09-20 10:49 ` SJ Park
2026-09-20 12:24 ` Donggeun Yoo
0 siblings, 1 reply; 3+ messages in thread
From: SJ Park @ 2026-09-20 10:49 UTC (permalink / raw)
To: Donggeun Yoo
Cc: SJ Park, Andrew Morton, damon, linux-mm, linux-kernel,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Jonathan Corbet, Shuah Khan, Randy Dunlap, linux-doc
On Sun, 20 Sep 2026 11:31:11 +0900 Donggeun Yoo <donggeunyoo.kernel@gmail.com> wrote:
> The temporal goal tuner converts the size quota into basis points in an
> unsigned long, so a quotas/bytes above ULONG_MAX / 10000 does not fit,
> and is handled as if no size quota were set. On 32-bit that is 429496
> bytes, well below the "echo $((1024*1024*1024)) > quotas/bytes" this
> document instructs. addr_unit does not raise the limit, though a larger
> unit does make it harder to reach.
>
> Note both in the goal_tuner description.
>
> Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
> ---
> Documentation/admin-guide/mm/damon/usage.rst | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
> index ba47255448564..ea7443b307826 100644
> --- a/Documentation/admin-guide/mm/damon/usage.rst
> +++ b/Documentation/admin-guide/mm/damon/usage.rst
> @@ -455,6 +455,13 @@ the background design of the feature and the name of the selectable algorithms.
> Refer to :ref:`goals directory <sysfs_schemes_quota_goals>` for the goals
> setup.
>
> +The ``temporal`` algorithm converts the size quota into basis points, so it
> +cannot represent a ``bytes`` value larger than 429496 on 32-bit kernels, or
> +1844674407370955 on 64-bit ones.
This feels like too much implementation details.
> Larger values are handled as if no size
> +quota were set.
I don't get what this means.
> :ref:`addr_unit <damon_design_addr_unit>` does not raise the
> +limit, but it does make the limit harder to reach: with a larger unit, the
> +same amount of memory is written to ``bytes`` as a smaller number.
I suggested it might make sense to document this problem, but now I doubt if
this is really helpful for users. Given the fact that the issue can happen on
only untested setups, I now think this documentation change is better not to be
made. Correct me if I'm wrong. If I'm not incorrect, could we drop this
patch?
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 3/3] Docs/admin-guide/mm/damon/usage: document the temporal tuner's quota limit
2026-09-20 10:49 ` SJ Park
@ 2026-09-20 12:24 ` Donggeun Yoo
0 siblings, 0 replies; 3+ messages in thread
From: Donggeun Yoo @ 2026-09-20 12:24 UTC (permalink / raw)
To: sj, akpm
Cc: damon, linux-mm, linux-kernel, david, ljs, liam, vbabka, rppt,
surenb, mhocko, corbet, skhan, rdunlap, linux-doc,
donggeunyoo.kernel
Thank you for the review.
On Sun, 20 Sep 2026 03:49:20 -0700 SJ Park <sj@kernel.org> wrote:
> I now think this documentation change is better not to be made.
> Correct me if I'm wrong. If I'm not incorrect, could we drop this
> patch?
You are not wrong, and I agree. Dropped in v3.
Thanks,
Donggeun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-20 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260920023111.2466265-1-donggeunyoo.kernel@gmail.com>
2026-09-20 2:31 ` [PATCH v2 3/3] Docs/admin-guide/mm/damon/usage: document the temporal tuner's quota limit Donggeun Yoo
2026-09-20 10:49 ` SJ Park
2026-09-20 12:24 ` Donggeun Yoo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox