Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/test_vmalloc.c: allow built-in execution

Remove the dependency on module loading ("m") for the vmalloc test suite,
enabling it to be built directly into the kernel, so both ("=m") and
("=y") are supported.

Motivation:
- Faster debugging/testing of vmalloc code;
- It allows to configure the test via kernel-boot parameters.

Configuration example:
test_vmalloc.nr_threads=64
test_vmalloc.run_test_mask=7
test_vmalloc.sequential_test_order=1

Link: https://lkml.kernel.org/r/20250417161216.88318-2-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Adrian Huang <ahuang12@lenovo.com>
Tested-by: Adrian Huang <ahuang12@lenovo.com>
Cc: Christop Hellwig <hch@infradead.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Uladzislau Rezki (Sony) and committed by
Andrew Morton
2d76e793 7a73348e

+4 -4
+1 -2
lib/Kconfig.debug
··· 2574 2574 config TEST_VMALLOC 2575 2575 tristate "Test module for stress/performance analysis of vmalloc allocator" 2576 2576 default n 2577 - depends on MMU 2578 - depends on m 2577 + depends on MMU 2579 2578 help 2580 2579 This builds the "test_vmalloc" module that should be used for 2581 2580 stress and performance analysis. So, any new change for vmalloc
+3 -2
lib/test_vmalloc.c
··· 591 591 kvfree(tdriver); 592 592 } 593 593 594 - static int vmalloc_test_init(void) 594 + static int __init vmalloc_test_init(void) 595 595 { 596 596 do_concurrent_test(); 597 - return -EAGAIN; /* Fail will directly unload the module */ 597 + /* Fail will directly unload the module */ 598 + return IS_BUILTIN(CONFIG_TEST_VMALLOC) ? 0:-EAGAIN; 598 599 } 599 600 600 601 module_init(vmalloc_test_init)