projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c86418b
)
lib/rand: improve __fill_random_buf()
author
Jens Axboe
<axboe@kernel.dk>
Fri, 1 Jul 2022 21:02:06 +0000
(15:02 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 1 Jul 2022 21:02:06 +0000
(15:02 -0600)
This won't be equivalent to what we have, but I _think_ the randomness
is good enough for this purpose.
This improves performance by about 30% for me, tested on both aarch64
and x86-64.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/rand.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/rand.c
b/lib/rand.c
index 2243c2b4342caed6e1983f52bd0c32ff9c024df4..1df1a7a049b9b14bb3c9334d4c2b7314e6168b07 100644
(file)
--- a/
lib/rand.c
+++ b/
lib/rand.c
@@
-103,8
+103,7
@@
void __fill_random_buf(void *buf, unsigned int len, uint64_t seed)
for (; b != e; ++b) {
*b = seed;
- seed *= GOLDEN_RATIO_PRIME;
- seed >>= 3;
+ seed *= GOLDEN_RATIO_64;
}
if (fio_unlikely(rest))