Re: [RFC PATCH 01/10] mm/damon: add CONFIG_DAMON_DEBUG_SANITY

From: SeongJae Park

Date: Sun Mar 01 2026 - 11:31:30 EST


On Sat, 21 Feb 2026 11:36:18 -0800 SeongJae Park <sj@xxxxxxxxxx> wrote:

> Add a new build config that will enable additional DAMON sanity checks.
> It is recommended to be enabled on only development and test setups,
> since it can impose additional overhead.
>
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
> ---
> mm/damon/Kconfig | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig
> index 8c868f7035fce..413adbd8e4089 100644
> --- a/mm/damon/Kconfig
> +++ b/mm/damon/Kconfig
> @@ -12,6 +12,17 @@ config DAMON
> See https://www.kernel.org/doc/html/latest/mm/damon/index.html for
> more information.
>
> +config DAMON_DEBUG_SANITY
> + bool "Check sanity of DAMON code"
> + depends on DAMON
> + help
> + This enables additional DAMON debugging-purpose sanity checks in
> + DAMON code. This can be useful for finding bugs, but impose
> + additional overhead. This is therefore recommended to be enable on

I will s/enable/enabled/ above in the next spin.

> + only development and test setups.
> +
> + If unsure, say N.
> +
> config DAMON_KUNIT_TEST
> bool "Test for damon" if !KUNIT_ALL_TESTS
> depends on DAMON && KUNIT=y
> --
> 2.47.3


Thanks,
SJ