summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2006-08-29 21:52:55 +0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 22:31:19 +0400
commit4090959aee403817ff386415f9bc602c1a0882ef (patch)
treee2bd8b6ea922b14def3309eb18fc7d469e635b90 /block
parentcf342e52e3117391868fb4bd900ce772a27a5a1a (diff)
downloadlinux-4090959aee403817ff386415f9bc602c1a0882ef.tar.xz
[PATCH] blktrace: cleanup using on_each_cpu
This patch kills a few lines of code in blktrace by making use of on_each_cpu(). Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blktrace.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/block/blktrace.c b/block/blktrace.c
index 2592f215a905..a45e61885037 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -476,6 +476,9 @@ static void blk_check_time(unsigned long long *t)
*t -= (a + b) / 2;
}
+/*
+ * calibrate our inter-CPU timings
+ */
static void blk_trace_check_cpu_time(void *data)
{
unsigned long long *t;
@@ -493,20 +496,6 @@ static void blk_trace_check_cpu_time(void *data)
put_cpu();
}
-/*
- * Call blk_trace_check_cpu_time() on each CPU to calibrate our inter-CPU
- * timings
- */
-static void blk_trace_calibrate_offsets(void)
-{
- unsigned long flags;
-
- smp_call_function(blk_trace_check_cpu_time, NULL, 1, 1);
- local_irq_save(flags);
- blk_trace_check_cpu_time(NULL);
- local_irq_restore(flags);
-}
-
static void blk_trace_set_ht_offsets(void)
{
#if defined(CONFIG_SCHED_SMT)
@@ -535,7 +524,7 @@ static void blk_trace_set_ht_offsets(void)
static __init int blk_trace_init(void)
{
mutex_init(&blk_tree_mutex);
- blk_trace_calibrate_offsets();
+ on_each_cpu(blk_trace_check_cpu_time, NULL, 1, 1);
blk_trace_set_ht_offsets();
return 0;