projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
fa80fea
)
Increase CPU clock calibration accuracy
author
Jens Axboe
<axboe@kernel.dk>
Mon, 10 Dec 2012 07:07:14 +0000
(08:07 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 10 Dec 2012 07:07:14 +0000
(08:07 +0100)
Lets throw some more loops at it, it reduces the noise.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
gettime.c
patch
|
blob
|
blame
|
history
diff --git
a/gettime.c
b/gettime.c
index 89a3a016e4c871a767365f96318392a65ec30ba6..549c35e9c0dc34826a69108e202f169ddffead05 100644
(file)
--- a/
gettime.c
+++ b/
gettime.c
@@
-201,13
+201,13
@@
static unsigned long get_cycles_per_usec(void)
gettimeofday(&e, NULL);
elapsed = utime_since(&s, &e);
- if (elapsed >= 10) {
+ if (elapsed >= 1
28
0) {
c_e = get_cpu_clock();
break;
}
} while (1);
- return
c_e - c_s
;
+ return
(c_e - c_s) >> 7
;
}
#define NR_TIME_ITERS 50