use shm for buffers.
exitall When one thread quits, terminate the others
bwavgtime=x Average bandwidth stats over x msec
+ create_serialize=x If 'x', serialize file creation.
+ create_fsync=x If 'x', run fsync() after file creation.
+ loops=x Run the job 'x' number of times.
Examples using cmd line jobs
#define DEF_BWAVGTIME (500)
#define DEF_CREATE_SER (1)
#define DEF_CREATE_FSYNC (1)
+#define DEF_LOOPS (1)
#define ALIGN(buf) (char *) (((unsigned long) (buf) + MASK) & ~(MASK))
unsigned int bw_avg_time;
unsigned int create_serialize;
unsigned int create_fsync;
+ unsigned int loops;
unsigned long long file_size;
unsigned long long file_offset;
unsigned int sync_io;
memcpy(&td->stat_sample_time, &td->start, sizeof(td->start));
- if (!td->use_aio)
- do_sync_io(td);
- else
- do_async_io(td);
+ while (td->loops--) {
+ if (!td->use_aio)
+ do_sync_io(td);
+ else
+ do_async_io(td);
+ }
td->runtime = mtime_since_now(&td->start);
ret = 0;
td->bw_avg_time = def_thread.bw_avg_time;
td->create_serialize = def_thread.create_serialize;
td->create_fsync = def_thread.create_fsync;
+ td->loops = def_thread.loops;
memcpy(&td->cpumask, &def_thread.cpumask, sizeof(td->cpumask));
return td;
fgetpos(f, &off);
continue;
}
+ if (!check_int(p, "loops", &td->loops)) {
+ fgetpos(f, &off);
+ continue;
+ }
if (!check_range(p, "bsrange", &ul1, &ul2)) {
td->min_bs = ul1;
td->max_bs = ul2;
def_thread.bw_avg_time = DEF_BWAVGTIME;
def_thread.create_serialize = DEF_CREATE_SER;
def_thread.create_fsync = DEF_CREATE_FSYNC;
+ def_thread.loops = DEF_LOOPS;
i = parse_options(argc, argv);