Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37568
b: refs/heads/master
c: 4090959
h: refs/heads/master
v: v3
  • Loading branch information
Martin Peschke authored and Jens Axboe committed Sep 30, 2006
1 parent b705c4e commit 60c23d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf342e52e3117391868fb4bd900ce772a27a5a1a
refs/heads/master: 4090959aee403817ff386415f9bc602c1a0882ef
19 changes: 4 additions & 15 deletions trunk/block/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 60c23d0

Please sign in to comment.