projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First step at speeding up io_u rand refill
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index afc90de001f720d266d0ad612cb8c2d1873958f9..4d3116b7fd4fc0901f4419e8690270c2c18a2d43 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-8,6
+8,7
@@
#include "fio.h"
#include "hash.h"
#include "verify.h"
#include "fio.h"
#include "hash.h"
#include "verify.h"
+#include "lib/rand.h"
struct io_completion_data {
int nr; /* input */
struct io_completion_data {
int nr; /* input */
@@
-1217,7
+1218,7
@@
void io_u_fill_buffer(struct thread_data *td, struct io_u *io_u,
if (!td->o.zero_buffers) {
while ((void *) ptr - io_u->buf < max_bs) {
if (!td->o.zero_buffers) {
while ((void *) ptr - io_u->buf < max_bs) {
- *ptr =
rand() * GOLDEN_RATIO_PRIME
;
+ *ptr =
__rand(&__fio_rand_state)
;
ptr++;
}
} else
ptr++;
}
} else