Re: [PATCH] mm/damon/paddr: add KUnit tests for addr_unit conversion

From: SJ Park

Date: Sun Nov 08 2026 - 13:07:25 EST


Hi Aveline,

On Mon, 09 Nov 2026 01:23:46 +1100 Aveline Noir <jm5905938@xxxxxxxxx> wrote:

> damon_pa_phys_addr() and damon_pa_core_addr() convert between DAMON core
> addresses and physical addresses using addr_unit. addr_unit lets 32-bit
> kernels with a 64-bit phys_addr_t monitor physical memory above 4 GiB,
> but no test covers the conversions.
>
> Add a KUnit suite for both helpers, including a case for addresses above
> 4 GiB that is skipped when phys_addr_t is 32-bit.

Thank you for this patch!

>
> Signed-off-by: Aveline Noir <jm5905938@xxxxxxxxx>
[...]
> --- a/mm/damon/Kconfig
> +++ b/mm/damon/Kconfig
> @@ -65,6 +65,18 @@ config DAMON_VADDR_KUNIT_TEST
>
> If unsure, say N.
>
> +config DAMON_PADDR_KUNIT_TEST
> + bool "Test for DAMON physical address space operations" if !KUNIT_ALL_TESTS

The above line has more than 80 characters. What about removing "space" ?

Other than that,

Reviewed-by: SJ Park <sj@xxxxxxxxxx>

Assuming you accept my above suggestion, I modified this patch and applied to
damon/next [1] tree. I will repost it soon (~1 week) as an mm.git merge
request. So, no action from your side is needed for now.

[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees


Thanks,
SJ

[...]