summaryrefslogtreecommitdiff
path: root/lib/zipf.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2012-11-07 19:47:47 +0100
committerJens Axboe <axboe@kernel.dk>2012-11-07 19:47:47 +0100
commit2316296a514711bb388d87b34742c04bb561d986 (patch)
tree1381ca5d0a55b2a0c483f0681f4cede5c96dbb74 /lib/zipf.h
parent1442ba18b74e353ecbdf828b43f965648de2d546 (diff)
downloadfio-2316296a514711bb388d87b34742c04bb561d986.tar.gz
fio-2316296a514711bb388d87b34742c04bb561d986.tar.bz2
zipf: seed zipf/pareto rand with filename hash and job id
We don't want 4 jobs operating on the same file to use the same hot spots. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/zipf.h')
-rw-r--r--lib/zipf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/zipf.h b/lib/zipf.h
index a23afe5e..dbcaffb2 100644
--- a/lib/zipf.h
+++ b/lib/zipf.h
@@ -14,10 +14,10 @@ struct zipf_state {
unsigned long rand_off;
};
-void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta);
+void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta, unsigned int seed);
unsigned long long zipf_next(struct zipf_state *zs);
-void pareto_init(struct zipf_state *zs, unsigned long nranges, double h);
+void pareto_init(struct zipf_state *zs, unsigned long nranges, double h, unsigned int seed);
unsigned long long pareto_next(struct zipf_state *zs);
#endif