Re: [PATCH 2/2] mm/damon/core-kunit: test damon_valid_probe_params()

SJ Park <[email protected]>
Newsgroups org.kvack.linux-mm,dev.linux.lists.damon,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 18 Aug 2026 03:45:52 +0000 Jason Angelov <[email protected]> wrote:

> damon_valid_probe_params() makes damon_commit_ctx() reject probe
> configurations that could overflow a probe_hits counter, a single
> (weight * probe_hits) product, or the sum of those products.
> 
> Add a kunit test covering each rejection at its boundary:
> 
> - samples per aggregation interval: U8_MAX is allowed, one more could
>   overflow a probe_hits counter
> - single weight: the largest whose product fits in unsigned int is
>   allowed, one larger is rejected
> - multiple probes: each product fits, but their sum overflows
> - no weight set: the validation is skipped

Thank you for adding these tests.

> 
> Signed-off-by: Jason Angelov <[email protected]>

Reviewed-by: SJ Park <[email protected]>


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.