mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zenghui Yu <zenghui.yu@linux.dev>
To: SJ Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH 01/10] mm/damon/api: remove NR_DAMOS_FILTER_TYPES
Date: Sat, 19 Sep 2026 21:02:30 +0800	[thread overview]
Message-ID: <ae900f5b-7f00-4c48-8097-f2f836c09f60@linux.dev> (raw)
In-Reply-To: <20260917142210.90829-2-sj@kernel.org>

On 9/17/26 10:21 PM, SJ Park wrote:
> Nobody uses NR_DAMOS_FILTER_TYPES.  Remove it.
> 
> Signed-off-by: SJ Park <sj@kernel.org>
> ---
>  include/linux/damon.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/linux/damon.h b/include/linux/damon.h
> index bbb190b474015..836353c4ab9aa 100644
> --- a/include/linux/damon.h
> +++ b/include/linux/damon.h
> @@ -400,7 +400,6 @@ struct damos_stat {
>   * @DAMOS_FILTER_TYPE_ADDR:	Address range.
>   * @DAMOS_FILTER_TYPE_TARGET:	Data Access Monitoring target.
>   * @DAMOS_FILTER_TYPE_PROBE_HITS_WSUM:	probe_hits weighted sum range.
> - * @NR_DAMOS_FILTER_TYPES:	Number of filter types.
>   *
>   * All types except &DAMOS_FILTER_TYPE_ADDR, &DAMOS_FILTER_TYPE_TARGET and
>   * &DAMOS_FILTER_TYPE_PROBE_HITS_WSUM are handled by the underlying &struct
> @@ -422,7 +421,6 @@ enum damos_filter_type {
>  	DAMOS_FILTER_TYPE_ADDR,
>  	DAMOS_FILTER_TYPE_TARGET,
>  	DAMOS_FILTER_TYPE_PROBE_HITS_WSUM,
> -	NR_DAMOS_FILTER_TYPES,
>  };
>  
>  /**

Similarly we have more definitions of NR_foo in damon.h:

 * @NR_DAMOS_ACTIONS:	Total number of DAMOS actions
 * @NR_DAMOS_QUOTA_GOAL_METRICS:	Number of DAMOS quota goal metrics.
 * @NR_DAMOS_WMARK_METRICS:	Total number of DAMOS watermark metrics
 * @NR_DAMON_OPS:	Number of monitoring operations implementations

and only NR_DAMON_OPS is actually used (I checked mm-new).  If the
preference is removing all unused macros, we should probably clean them up
as well.

Thanks,
Zenghui

  parent reply	other threads:[~2026-09-19 13:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 14:21 [PATCH 00/10] mm/damon: improve readability, clarity and test coverage SJ Park
2026-09-17 14:21 ` [PATCH 01/10] mm/damon/api: remove NR_DAMOS_FILTER_TYPES SJ Park
2026-09-17 14:43   ` Gutierrez Asier
2026-09-19 13:02   ` Zenghui Yu [this message]
2026-09-19 15:57     ` SJ Park
2026-09-20  1:23       ` Zenghui Yu
2026-09-17 14:22 ` [PATCH 02/10] mm/damon/core: use abs_diff() in damon_feed_loop_next_input() SJ Park
2026-09-17 14:43   ` Gutierrez Asier
2026-09-17 14:22 ` [PATCH 03/10] mm/damon/core: use mult_frac() " SJ Park
2026-09-17 14:44   ` Gutierrez Asier
2026-09-17 14:22 ` [PATCH 04/10] mm/damon/core: set damon_ctx->walk_control_obsolete in damon_new_ctx() SJ Park
2026-09-17 14:22 ` [PATCH 05/10] mm/damon/core: document damon_call()/damon_start() race hang issue SJ Park
2026-09-17 14:22 ` [PATCH 06/10] mm/damon/paddr: remove pa parameter from damon_pa_filter_pass() SJ Park
2026-09-17 14:22 ` [PATCH 07/10] mm/damon/tests/core-kunit: test eligible_mem_bp commitment SJ Park
2026-09-17 14:22 ` [PATCH 08/10] mm/damon/tests/core-kunit: add probe_hits_wsum damos filter commit test SJ Park
2026-09-17 14:22 ` [PATCH 09/10] selftests/damon/sysfs_memcg_path_leak: fail only for real DAMON leak SJ Park
2026-09-17 14:22 ` [PATCH 10/10] Docs/mm/damon/design: clarify bp is basis point SJ Park
2026-09-19 12:39   ` Zenghui Yu
2026-09-17 14:37 ` [PATCH 00/10] mm/damon: improve readability, clarity and test coverage SJ Park
2026-09-17 21:57 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae900f5b-7f00-4c48-8097-f2f836c09f60@linux.dev \
    --to=zenghui.yu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®