Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Mar 8, 2016 Library code

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 7c4d0fb7e9e038000978b43b5674f9ad049d36b9:

Fix double free of td zone state index (2016-03-04 19:50:41 -0700)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to de4096e8682a064ed9125af7ac30a3fe4021167b:

rand: use bools (2016-03-07 15:38:44 -0700)

----------------------------------------------------------------
Andrey Kuzmin (1):
io_u: speed up __get_next_buflen()

Jens Axboe (5):
options: unify the bssplit/zone split code
options: finish merge of bssplit/rand zone code
options: improvements to parse dry run Add the sample JESD219 job file
rand: use bools

 examples/jesd219.fio |  19 ++++
 io_u.c               |   2 +-
 lib/rand.c           |   4 +-
 lib/rand.h           |   5 +-
 options.c            | 267 ++++++++++++++++++++++++---------------------------
 5 files changed, 152 insertions(+), 145 deletions(-)
 create mode 100644 examples/jesd219.fio

---

Diff of recent changes:

examples/jesd219.fio new file +19 -0
new file mode 100644
index 0000000..ab2c40e
@@ -0,0 +1,19 @@
+# Sample implementation of the JESD219 workload for SSD endurance
+# testing. It uses a specific distribution of block sizes and
+# read/write mix, as well as a specific distribution of where on
+# the device the IO accesses will land. Based on posting from
+# Jeff Furlong <[email protected]>
+[JESD219]
+ioengine=libaio
+direct=1
+rw=randrw
+norandommap
+randrepeat=0
+rwmixread=40
+rwmixwrite=60
+iodepth=256
+numjobs=4
+bssplit=512/4:1024/1:1536/1:2048/1:2560/1:3072/1:3584/1:4k/67:8k/10:16k/7:32k/3:64k/3
+random_distribution=zoned:50/5:30/15:20/80
+filename=/dev/nvme0n1
+group_reporting=1
io_u.c +1 -1
index 0a39886..3299f29 100644
@@ -553,7 +553,7 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
 
 				buflen = bsp->bs;
 				perc += bsp->perc;
-				if ((r <= ((frand_max / 100L) * perc)) &&
+				if ((r * 100UL <= frand_max * perc) &&
 				    io_u_fits(td, io_u, buflen))
 					break;
 			}
lib/rand.c +2 -2
index 1b661a8..9c3e0d6 100644
@@ -76,7 +76,7 @@ static void __init_rand64(struct taus258_state *state, uint64_t seed)
 		__rand64(state);
 }
 
-void init_rand(struct frand_state *state, int use64)
+void init_rand(struct frand_state *state, bool use64)
 {
 	state->use64 = use64;
 
@@ -86,7 +86,7 @@ void init_rand(struct frand_state *state, int use64)
 		__init_rand64(&state->state64, 1);
 }
 
-void init_rand_seed(struct frand_state *state, unsigned int seed, int use64)
+void init_rand_seed(struct frand_state *state, unsigned int seed, bool use64)
 {
 	state->use64 = use64;
 
lib/rand.h +3 -2
index 49773b0..24fac23 100644
@@ -2,6 +2,7 @@
 #define FIO_RAND_H
 
 #include <inttypes.h>
+#include "types.h"
 #include "../arch/arch.h"
 
 #define FRAND32_MAX	(-1U)
@@ -128,8 +129,8 @@ static inline int rand_between(struct frand_state *state, int start, int end)
 	return start + (int) ((double)end * (r / (rand_max(state) + 1.0)));
 }
 
-extern void init_rand(struct frand_state *, int);
-extern void init_rand_seed(struct frand_state *, unsigned int seed, int);
+extern void init_rand(struct frand_state *, bool);
+extern void init_rand_seed(struct frand_state *, unsigned int seed, bool);
 extern void __fill_random_buf(void *buf, unsigned int len, unsigned long seed);
 extern unsigned long fill_random_buf(struct frand_state *, void *buf, unsigned int len);
 extern void __fill_random_buf_percentage(unsigned long, void *, unsigned int, unsigned int, unsigned int, char *, unsigned int);
options.c +127 -140

445 lines not on this page · raw message