Re: [patch v2 0/2] mm: kunit: complete the 2009 mm test suite trifecta

From: Vlastimil Babka (SUSE)

Date: Wed Dec 02 2026 - 07:09:13 EST


On 11/29/26 22:25, David Rientjes wrote:
> Follow-up to "mm: vmstat_kunit: add synthetic benchmark for mm stats"
> staged in mm-unstable.
>
> These are two additional tests from 2009 that we've been carrying
> internally since then. They were converted to use KUnit just like the
> vmstat variant.
>
> Christoph Lameter (2):
> mm: page_alloc_kunit: add synthetic benchmark for the page allocator
> mm: slab_kunit: add synthetic benchmark for the slab allocator
>
> MAINTAINERS | 2 +
> mm/Kconfig | 26 ++
> mm/Makefile | 2 +
> mm/tests/page_alloc_kunit.c | 490 ++++++++++++++++++++++++++++
> mm/tests/slab_kunit.c | 614 ++++++++++++++++++++++++++++++++++++

At least for slab we already have lib/tests/slub_kunit.c for functional tests.
I agree that mm/tests/ is a better placement thank lib/tests/
But in the end you'd modprobe slub_kunit or slab_kunit, which is not a great
way to distinguish those.
Could we call it just slab_bench.c? The "kunit" in filename doesn't seem
mandatory.
(analogically for page_alloc while we're there)

> 5 files changed, 1134 insertions(+)
> create mode 100644 mm/tests/page_alloc_kunit.c
> create mode 100644 mm/tests/slab_kunit.c
>