From dac868294eab98608cc0e075fddd2de0968ddbf8 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 19 Aug 2008 16:23:48 +0000 Subject: [PATCH] update test git-svn-id: http://ltt.polymtl.ca/svn@3035 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/tests/kernel/test-wbias-rwlock.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/trunk/tests/kernel/test-wbias-rwlock.c b/trunk/tests/kernel/test-wbias-rwlock.c index 6cfac1f5..de38c7a8 100644 --- a/trunk/tests/kernel/test-wbias-rwlock.c +++ b/trunk/tests/kernel/test-wbias-rwlock.c @@ -616,13 +616,17 @@ static int my_open(struct inode *inode, struct file *file) cycles_calibration_max); printk("** Single writer test, no contention **\n"); + wbias_rwlock_profile_latency_reset(); writer_threads[0] = kthread_run(writer_thread, (void *)0, "wbiasrwlock_writer"); BUG_ON(!writer_threads[0]); ssleep(SINGLE_WRITER_TEST_DURATION); kthread_stop(writer_threads[0]); + wbias_rwlock_profile_latency_print(); + printk("** Single trylock writer test, no contention **\n"); + wbias_rwlock_profile_latency_reset(); trylock_writer_threads[0] = kthread_run(trylock_writer_thread, (void *)0, "trylock_wbiasrwlock_writer"); @@ -630,14 +634,20 @@ static int my_open(struct inode *inode, struct file *file) ssleep(SINGLE_WRITER_TEST_DURATION); kthread_stop(trylock_writer_threads[0]); + wbias_rwlock_profile_latency_print(); + printk("** Single reader test, no contention **\n"); + wbias_rwlock_profile_latency_reset(); reader_threads[0] = kthread_run(reader_thread, (void *)0, "wbiasrwlock_reader"); BUG_ON(!reader_threads[0]); ssleep(SINGLE_READER_TEST_DURATION); kthread_stop(reader_threads[0]); + wbias_rwlock_profile_latency_print(); + printk("** Multiple readers test, no contention **\n"); + wbias_rwlock_profile_latency_reset(); for (i = 0; i < NR_READERS; i++) { printk("starting reader thread %lu\n", i); reader_threads[i] = kthread_run(reader_thread, (void *)i, @@ -648,11 +658,16 @@ static int my_open(struct inode *inode, struct file *file) for (i = 0; i < NR_READERS; i++) kthread_stop(reader_threads[i]); + wbias_rwlock_profile_latency_print(); + printk("** High contention test **\n"); + wbias_rwlock_profile_latency_reset(); perform_test("wbias-rwlock-create", wbias_rwlock_create); ssleep(TEST_DURATION); perform_test("wbias-rwlock-stop", wbias_rwlock_stop); + wbias_rwlock_profile_latency_print(); + return -EPERM; } -- 2.34.1