Instead of using lrand48_r, use the internal fio random number generator.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
T_PIPE_ASYNC_OBJS = t/read-to-pipe-async.o
T_PIPE_ASYNC_PROGS = t/read-to-pipe-async
-T_IOU_RING_OBJS = t/io_uring.o
-T_IOU_RING_OBJS += t/arch.o
+T_IOU_RING_OBJS = t/io_uring.o lib/rand.o lib/pattern.o lib/strntol.o
T_IOU_RING_PROGS = t/io_uring
T_MEMLOCK_OBJS = t/memlock.o
__rand32(state);
}
-static void __init_rand64(struct taus258_state *state, uint64_t seed)
+void __init_rand64(struct taus258_state *state, uint64_t seed)
{
int cranks = 6;
extern void init_rand(struct frand_state *, bool);
extern void init_rand_seed(struct frand_state *, uint64_t seed, bool);
+void __init_rand64(struct taus258_state *state, uint64_t seed);
extern void __fill_random_buf(void *buf, unsigned int len, uint64_t seed);
extern uint64_t fill_random_buf(struct frand_state *, void *buf, unsigned int len);
extern void __fill_random_buf_percentage(uint64_t, void *, unsigned int, unsigned int, unsigned int, char *, unsigned int);
#include "../arch/arch.h"
#include "../lib/types.h"
#include "../lib/roundup.h"
+#include "../lib/rand.h"
#include "../minmax.h"
#include "../os/linux/io_uring.h"
__s32 *fds;
+ struct taus258_state rand_state;
+
unsigned long *clock_batch;
int clock_index;
unsigned long *plat;
}
f->pending_ios++;
- r = lrand48();
+ r = __rand64(&s->rand_state);
offset = (r % (f->max_blocks - 1)) * bs;
if (register_files) {
s->tid = gettid();
printf("submitter=%d, tid=%d\n", s->index, s->tid);
+ __init_rand64(&s->rand_state, pthread_self());
srand48(pthread_self());
for (i = 0; i < MAX_FDS; i++)