[patch 0/3] lib: add synthetic MM benchmarks
From: David Rientjes
Date: Fri Jul 31 2026 - 00:27:01 EST
A blast to the past :)
We've been carrying these synthetic benchmarks in our kernel tree since
2009 because they've been helpful to identify regressions in hot paths, as
well as quantifying any improvements that have been made for new changes.
Hopefully they can be useful to others as well.
The synthetic benchmarks are run by loading the module at runtime. The
modprobe will fail intentionally so that the module gets insta-unloaded.
The test results are emitted to the kernel log.
Proposed with permission from Christoph.
---
lib/Kconfig.debug | 30 ++++
lib/Makefile | 3 +
lib/test_pagealloc.c | 337 ++++++++++++++++++++++++++++++++++++++
lib/test_slab.c | 375 +++++++++++++++++++++++++++++++++++++++++++
lib/test_vmstat.c | 95 +++++++++++
5 files changed, 840 insertions(+)
create mode 100644 lib/test_pagealloc.c
create mode 100644 lib/test_slab.c
create mode 100644 lib/test_vmstat.c