Re: [PATCH 1/3] docs/mm/damon/design: accurate semantics of nr_snapshots

SJ Park <[email protected]>
Newsgroups dev.linux.lists.damon,org.kvack.linux-mm
Message-ID <[email protected]>
On Tue, 11 Aug 2026 18:18:39 +0800 Liew Rui Yan <[email protected]> wrote:

> Change "tried to be applied" -> "tried to be completely applied" to
> maintain consistency between the documentation and the code.

It feels bit confusing to me.  The completion in this context is for "trial",
not "application".  For example, someone might wrongly think the number could
be incremented even if a scheme was "tried" to be completely "applied" to the
snapshot, but failed due to a quota.

What about "completely tried to be applied"?

> 
> Signed-off-by: Liew Rui Yan <[email protected]>
> ---
>  Documentation/mm/damon/design.rst | 2 +-
>  include/linux/damon.h             | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
> index aed6cb1cf483..939298f2a9b9 100644
> --- a/Documentation/mm/damon/design.rst
> +++ b/Documentation/mm/damon/design.rst
> @@ -847,7 +847,7 @@ scheme's execution.
>  - ``sz_applied``: Total size of regions that the scheme is applied.
>  - ``qt_exceeds``: Total number of times the quota of the scheme has exceeded.
>  - ``nr_snapshots``: Total number of DAMON snapshots that the scheme is tried to
> -  be applied.
> +  be completely applied.
>  - ``max_nr_snapshots``: Upper limit of ``nr_snapshots``.
>  
>  "A scheme is tried to be applied to a region" means DAMOS core logic determined
> diff --git a/include/linux/damon.h b/include/linux/damon.h
> index 0c8b7ddef9ab..d642ce4fc83c 100644
> --- a/include/linux/damon.h
> +++ b/include/linux/damon.h
> @@ -357,7 +357,8 @@ struct damos_watermarks {
>   *		Total bytes that passed ops layer-handled DAMOS filters.
>   * @qt_exceeds: Total number of times the quota of the scheme has exceeded.
>   * @nr_snapshots:
> - *		Total number of DAMON snapshots that the scheme has tried.
> + *		Total number of DAMON snapshots that the scheme is tried to be
> + *		completely applied.
>   *
>   * "Tried an action to a region" in this context means the DAMOS core logic
>   * determined the region as eligible to apply the action.  The access pattern
> -- 
> 2.55.0


Thanks,
SJ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.