lib/rand: improve __fill_random_buf()
authorJens Axboe <axboe@kernel.dk>
Fri, 1 Jul 2022 16:44:25 +0000 (10:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Jul 2022 16:54:50 +0000 (10:54 -0600)
commit76c37788d45145b00004b4ef09856c8c3892006a
tree94d0f1c3cbb6ea0a08f21bf29d55640d78c7be5b
parent36c4e89c70973bce3f7984bb1488c34eeac27fc1
lib/rand: improve __fill_random_buf()

This won't be equivalent to what we have, but I _think_ the randomness
is good enough for this purpose.

While in there, fixup the coding style to conform to fio standards,
and simplify the setup and loop.

This improves performance by about 30% for me, tested on both aarch64
and x86-64.

Link: https://github.com/axboe/fio/pull/1417
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/rand.c