Re: [PATCH v5 9/9] mm: switch deferred split shrinker to list_lru

From: Johannes Weiner

Date: Thu May 28 2026 - 10:13:13 EST


On Thu, May 28, 2026 at 12:08:05AM -0700, SeongJae Park wrote:
> From 23b5800dd49085707baee5774b74782c3e424f24 Mon Sep 17 00:00:00 2001
> From: SeongJae Park <sj@xxxxxxxxxx>
> Date: Wed, 27 May 2026 23:58:07 -0700
> Subject: [PATCH] mm/huge_mm: define memcg_alloc_deferred() for
> !CONFIG_TRANSPARENT_HUGEPPAGE
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Without this, UM mode kunit fails like below.
>
> $ ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests/
> [00:00:02] Configuring KUnit Kernel ...
> [00:00:02] Building KUnit Kernel ...
> Populating config with:
> $ make ARCH=um O=.kunit olddefconfig
> Building with:
> $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=8
> ERROR:root:../mm/swap_state.c: In function ‘__swap_cache_alloc’:
> ../mm/swap_state.c:468:26: error: implicit declaration of function ‘folio_memcg_alloc_deferred’ [-Wimplicit-function-declaration]
> 468 | if (order > 1 && folio_memcg_alloc_deferred(folio)) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> make[4]: *** [../scripts/Makefile.build:289: mm/swap_state.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [../scripts/Makefile.build:548: mm] Error 2
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [/home/lkhack/linux/Makefile:2143: .] Error 2
> make[1]: *** [/home/lkhack/linux/Makefile:248: __sub-make] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
> Fix by implementing the function for CONFIG_TRANSPARENT_HUGEPPAGE unset
> case.
>
> Fixes: https://lore.kernel.org/20260527204757.2544958-10-hannes@xxxxxxxxxxx
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>

Whoops, thanks for the fix, SJ. I'll incorporate UM builds into my
final compile test before sending.

Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>