Re: [PATCH v2 1/7] mm/damon/api: introduce DAMOS_FILTER_TYPE_PROBE_HITS_WSUM
From: SJ Park
Date: Fri Sep 11 2026 - 10:32:14 EST
On Fri, 11 Sep 2026 06:55:03 -0700 SJ Park <sj@xxxxxxxxxx> wrote:
> Update DAMON kernel API to introduce new DAMOS core filter type,
> PROBE_HITS_WSUM. It will allow API callers to describe the DAMOS action
> target regions based on their probe_hits weighted sum. For describing
> the filtering target weighted sum range, add two type-dependent union
> fields to damos_filter.
>
> Signed-off-by: SJ Park <sj@xxxxxxxxxx>
> ---
> include/linux/damon.h | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/damon.h b/include/linux/damon.h
> index 16800b3dc379b..9e84bdeb5616d 100644
> --- a/include/linux/damon.h
> +++ b/include/linux/damon.h
> @@ -399,14 +399,15 @@ struct damos_stat {
> * @DAMOS_FILTER_TYPE_UNMAPPED: Unmapped pages.
> * @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 and &DAMOS_FILTER_TYPE_TARGET
> - * are handled by the underlying &struct damon_operations as a part of scheme
> - * action trying, and therefore accounted as 'tried'. In contrast,
> - * &DAMOS_FILTER_TYPE_ADDR and &DAMOS_FILTER_TYPE_TARGET filters are handled
> - * by the core layer before trying of the action, and therefore not accounted
> - * as 'tried'.
> + * All types except &DAMOS_FILTER_TYPE_ADDR, &DAMOS_FILTER_TYPE_TARGET and
> + * &DAMOS_FILTER_TYPE_PROBE_HITS_WSUM are handled by the underlying &struct
> + * damon_operations as a part of scheme action trying, and therefore accounted
> + * as 'tried'. In contrast, &DAMOS_FILTER_TYPE_ADDR and
> + * &DAMOS_FILTER_TYPE_TARGET filters are handled by the core layer before
> + * trying of the action, and therefore not accounted as 'tried'.
Sashiko found [1] the second sentence is also better to be updated. Reposting
this patch only for the trivial change feels too much to me. Andrew, could you
please add attaching patch as a fixup? Please let me know if you prefer
reposting the series.
[1] https://lore.kernel.org/20260911142049.97838-1-sj@xxxxxxxxxx
Thanks,
SJ
[...]
=== >8 ===