t/genzipf update
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 8bb5b0346eddde2f13aa17b87f8408d4ae281d8c..7eb0abba0fa5572222e08a3caa7db63198bc0a98 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -39,6 +39,7 @@ struct thread_data;
 #include "server.h"
 #include "stat.h"
 #include "flow.h"
+#include "lib/zipf.h"
 
 #ifdef FIO_HAVE_GUASI
 #include <guasi.h>
@@ -48,6 +49,16 @@ struct thread_data;
 #include <sys/asynch.h>
 #endif
 
+#ifdef FIO_HAVE_LIBNUMA
+#include <linux/mempolicy.h>
+#include <numa.h>
+
+/*
+ * "local" is pseudo-policy
+ */
+#define MPOL_LOCAL MPOL_MAX
+#endif
+
 /*
  * What type of allocation to use for io buffers
  */
@@ -167,6 +178,10 @@ struct thread_options {
        unsigned int bs_unaligned;
        unsigned int fsync_on_close;
 
+       unsigned int random_distribution;
+       double zipf_theta;
+       double pareto_h;
+
        unsigned int hugepage_size;
        unsigned int rw_min_bs;
        unsigned int thinktime;
@@ -188,6 +203,8 @@ struct thread_options {
        enum fio_memtype mem_type;
        unsigned int mem_align;
 
+       unsigned int max_latency;
+
        unsigned int stonewall;
        unsigned int new_group;
        unsigned int numjobs;
@@ -195,6 +212,14 @@ struct thread_options {
        unsigned int cpumask_set;
        os_cpu_mask_t verify_cpumask;
        unsigned int verify_cpumask_set;
+#ifdef FIO_HAVE_LIBNUMA
+       struct bitmask *numa_cpunodesmask;
+       unsigned int numa_cpumask_set;
+       unsigned short numa_mem_mode;
+       unsigned int numa_mem_prefer_node;
+       struct bitmask *numa_memnodesmask;
+       unsigned int numa_memmask_set;
+#endif
        unsigned int iolog;
        unsigned int rwmixcycle;
        unsigned int rwmix[2];
@@ -432,6 +457,11 @@ struct thread_data {
                struct frand_state __random_state;
        };
 
+       /*
+        * Used for zipf random distribution
+        */
+       struct zipf_state zipf;
+
        struct timeval start;   /* start of this loop */
        struct timeval epoch;   /* time job was started */
        struct timeval last_issue;
@@ -795,4 +825,10 @@ enum {
        FIO_OUTPUT_NORMAL,
 };
 
+enum {
+       FIO_RAND_DIST_RANDOM    = 0,
+       FIO_RAND_DIST_ZIPF,
+       FIO_RAND_DIST_PARETO,
+};
+
 #endif