From f7d26a17e6b5b50aff4bf49e583566bbfd18e056 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 21 May 2009 18:50:22 +0000 Subject: [PATCH] update test module git-svn-id: http://ltt.polymtl.ca/svn@3389 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/tests/kernel/Makefile | 2 +- ...test-rcu-speed.c => test-read-lock-speed.c} | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) rename trunk/tests/kernel/{test-rcu-speed.c => test-read-lock-speed.c} (91%) diff --git a/trunk/tests/kernel/Makefile b/trunk/tests/kernel/Makefile index eada47ca..adcc35c5 100644 --- a/trunk/tests/kernel/Makefile +++ b/trunk/tests/kernel/Makefile @@ -26,7 +26,7 @@ endif #obj-m += test-psrwlock.o obj-m += test-cmpxchg-nolock2.o # obj-m += test-trace-speed.o - obj-m += test-rcu-speed.o + obj-m += test-read-lock-speed.o # obj-m += test-fct-speed.o # obj-m += test-int3-speed.o # obj-m += test-kprobes2.o diff --git a/trunk/tests/kernel/test-rcu-speed.c b/trunk/tests/kernel/test-read-lock-speed.c similarity index 91% rename from trunk/tests/kernel/test-rcu-speed.c rename to trunk/tests/kernel/test-read-lock-speed.c index 49930b9a..62d60463 100644 --- a/trunk/tests/kernel/test-rcu-speed.c +++ b/trunk/tests/kernel/test-read-lock-speed.c @@ -1,12 +1,16 @@ -/* test-rcu-speed.c +/* + * test-read-lock-speed.c * * Compare speed of : - * - spin lock irqsave/ spin unlock irqrestore + * - spin lock irqsave / spin unlock irqrestore (close to rwlocks when + * uncontended) * - using a sequence read lock (uncontended) - * - preempt disable/enable + * - preempt disable/enable (RCU) + * + * Copyright 2009 - Mathieu Desnoyers + * Distributed under GPLv2 */ - #include #include #include @@ -145,7 +149,8 @@ static void do_test_preempt(void) time = time2 - time1; local_irq_restore(flags); - printk(KERN_ALERT "test results: time for preempt disable/enable pairs\n"); + printk(KERN_ALERT + "test results: time for preempt disable/enable pairs\n"); printk(KERN_ALERT "number of loops: %d\n", NR_LOOPS); printk(KERN_ALERT "total time: %llu\n", time); time = div_u64_rem(time, NR_LOOPS, &rem); @@ -176,5 +181,4 @@ module_exit(ltt_test_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mathieu Desnoyers"); -MODULE_DESCRIPTION("Cmpxchg vs int Test"); - +MODULE_DESCRIPTION("Test read lock speed"); -- 2.34.1