Fio 2.1
[fio.git] / lib / zipf.c
index c348c9c3fd5cbac2eb2985092157a4e29dd72902..9b6ce6334836baa1f0f3c0c238da24f319ad4c3b 100644 (file)
@@ -18,12 +18,10 @@ static void zipf_update(struct zipf_state *zs)
        unsigned long to_gen;
        unsigned int i;
 
-       log_info("fio: generating zetan for theta=%f, ranges=%lu\n", zs->theta, zs->nranges);
-
        /*
         * It can become very costly to generate long sequences. Just cap it at
-        * 10M max, that should be doable in 1-2s on even slow machines. Precision
-        * will take a slight hit, but nothing major.
+        * 10M max, that should be doable in 1-2s on even slow machines.
+        * Precision will take a slight hit, but nothing major.
         */
        to_gen = min(zs->nranges, ZIPF_MAX_GEN);
 
@@ -71,7 +69,7 @@ unsigned long long zipf_next(struct zipf_state *zs)
        else
                val = 1 + (unsigned long long)(n * pow(eta*rand_uni - eta + 1.0, alpha));
 
-       return (__hash_long(val - 1) + zs->rand_off) % zs->nranges;
+       return (__hash_u64(val - 1) + zs->rand_off) % zs->nranges;
 }
 
 void pareto_init(struct zipf_state *zs, unsigned long nranges, double h,
@@ -86,5 +84,5 @@ unsigned long long pareto_next(struct zipf_state *zs)
        double rand = (double) __rand(&zs->rand) / (double) FRAND_MAX;
        unsigned long long n = zs->nranges - 1;
 
-       return (__hash_long(n * pow(rand, zs->pareto_pow)) + zs->rand_off) % zs->nranges;
+       return (__hash_u64(n * pow(rand, zs->pareto_pow)) + zs->rand_off) % zs->nranges;
 }