[RFC In-kernel benchmarks 1/3] Add slab performance tests

Previous thread: [RFC In-kernel benchmarks 3/3] Page allocator test by Christoph Lameter on Tuesday, October 13, 2009 - 1:02 pm. (1 message)

Next thread: [patch 0/3] x86 apic series by Cyrill Gorcunov on Tuesday, October 13, 2009 - 1:07 pm. (14 messages)
From: Christoph Lameter
Date: Tuesday, October 13, 2009 - 1:02 pm

In kernel benchmarks are benchmarks that directly run in kernel space.

The test modules are regular kernel modules that can be loaded with

	modprobe slab_test

or so. 

The initialization function of the module will then run the test
and fail so that the module is not loaded. The output of the test
results will be written to the system log.

This is a rough draft. I have used these in the past to benchmark
page allocator, slab allocator and vmstat performance.

--

From: Christoph Lameter
Date: Tuesday, October 13, 2009 - 1:02 pm

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 ...
From: David Rientjes
Date: Thursday, October 15, 2009 - 1:09 am

I like the addition of these benchmarks to the kernel source, I've been 
adding Mathieu's slab benchmark to my tree for a while.  It looks like 
they all need some degree of cleanup, though: they have checkpatch 
warnings, they frequently do not handle memory allocation failures, and it 
would be nice to have a consistent loglevel for all the results.
--

Previous thread: [RFC In-kernel benchmarks 3/3] Page allocator test by Christoph Lameter on Tuesday, October 13, 2009 - 1:02 pm. (1 message)

Next thread: [patch 0/3] x86 apic series by Cyrill Gorcunov on Tuesday, October 13, 2009 - 1:07 pm. (14 messages)