This is a test of slab allocator performance tests.
Run
modprobe slab_test
to execute. Output will be written to the syslog.
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
---
Makefile | 2
include/Kbuild | 1
lib/Kconfig.debug | 1
tests/Kconfig | 19 ++
tests/Makefile | 2
tests/slab_test.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 397 insertions(+), 1 deletion(-)
create mode 100644 tests/Makefile
create mode 100644 tests/slab_test.c
Index: linux-2.6/Makefile
===================================================================
--- linux-2.6.orig/Makefile 2009-10-12 15:32:26.000000000 -0500
+++ linux-2.6/Makefile 2009-10-12 15:32:30.000000000 -0500
@@ -686,7 +686,7 @@ export mod_strip_cmd
ifeq ($(KBUILD_EXTMOD),)
-core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ tests/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
Index: linux-2.6/include/Kbuild
===================================================================
--- linux-2.6.orig/include/Kbuild 2009-10-12 15:32:26.000000000 -0500
+++ linux-2.6/include/Kbuild 2009-10-12 15:32:30.000000000 -0500
@@ -10,3 +10,4 @@ header-y += video/
header-y += drm/
header-y += xen/
header-y += scsi/
+header-y += tests/
Index: linux-2.6/tests/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6/tests/Makefile 2009-10-12 15:32:30.000000000 -0500
@@ -0,0 +1,2 @@
+obj-$(CONFIG_BENCHMARK_SLAB) += slab_test.o
+
Index: linux-2.6/tests/slab_test.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6/tests/slab_test.c 2009-10-12 15:32:47.000000000 -0500
@@ -0,0 +1,373 @@
+/* test-slab.c
+ *
+ * Test module for ...