6e222f9758721970847a03313281fa7bae07727f
[fio.git] / fio.h
1 #ifndef FIO_H
2 #define FIO_H
3
4 #include <sched.h>
5 #include <limits.h>
6 #include <pthread.h>
7 #include <sys/time.h>
8 #include <sys/resource.h>
9 #include <errno.h>
10 #include <stdlib.h>
11 #include <stdio.h>
12 #include <unistd.h>
13 #include <string.h>
14 #include <getopt.h>
15 #include <inttypes.h>
16 #include <assert.h>
17
18 #include "compiler/compiler.h"
19 #include "flist.h"
20 #include "fifo.h"
21 #include "rbtree.h"
22 #include "arch/arch.h"
23 #include "os/os.h"
24 #include "mutex.h"
25 #include "log.h"
26 #include "debug.h"
27 #include "file.h"
28 #include "io_ddir.h"
29 #include "ioengine.h"
30
31 #ifdef FIO_HAVE_GUASI
32 #include <guasi.h>
33 #endif
34
35 #ifdef FIO_HAVE_SOLARISAIO
36 #include <sys/asynch.h>
37 #endif
38
39 /*
40  * Use for maintaining statistics
41  */
42 struct io_stat {
43         unsigned long max_val;
44         unsigned long min_val;
45         unsigned long samples;
46
47         double mean;
48         double S;
49 };
50
51 /*
52  * A single data sample
53  */
54 struct io_sample {
55         unsigned long time;
56         unsigned long val;
57         enum fio_ddir ddir;
58         unsigned int bs;
59 };
60
61 /*
62  * Dynamically growing data sample log
63  */
64 struct io_log {
65         unsigned long nr_samples;
66         unsigned long max_samples;
67         struct io_sample *log;
68 };
69
70 /*
71  * When logging io actions, this matches a single sent io_u
72  */
73 struct io_piece {
74         union {
75                 struct rb_node rb_node;
76                 struct flist_head list;
77         };
78         union {
79                 int fileno;
80                 struct fio_file *file;
81         };
82         unsigned long long offset;
83         unsigned long len;
84         enum fio_ddir ddir;
85         union {
86                 unsigned long delay;
87                 unsigned int file_action;
88         };
89 };
90
91 struct group_run_stats {
92         unsigned long long max_run[2], min_run[2];
93         unsigned long long max_bw[2], min_bw[2];
94         unsigned long long io_kb[2];
95         unsigned long long agg[2];
96 };
97
98 /*
99  * What type of allocation to use for io buffers
100  */
101 enum fio_memtype {
102         MEM_MALLOC = 0, /* ordinary malloc */
103         MEM_SHM,        /* use shared memory segments */
104         MEM_SHMHUGE,    /* use shared memory segments with huge pages */
105         MEM_MMAP,       /* use anonynomous mmap */
106         MEM_MMAPHUGE,   /* memory mapped huge file */
107 };
108
109 enum fio_ioengine_flags {
110         FIO_SYNCIO      = 1 << 0,       /* io engine has synchronous ->queue */
111         FIO_RAWIO       = 1 << 1,       /* some sort of direct/raw io */
112         FIO_DISKLESSIO  = 1 << 2,       /* no disk involved */
113         FIO_NOEXTEND    = 1 << 3,       /* engine can't extend file */
114         FIO_NODISKUTIL  = 1 << 4,       /* diskutil can't handle filename */
115         FIO_UNIDIR      = 1 << 5,       /* engine is uni-directional */
116         FIO_NOIO        = 1 << 6,       /* thread does only pseudo IO */
117         FIO_SIGQUIT     = 1 << 7,       /* needs SIGQUIT to exit */
118 };
119
120 /*
121  * How many depth levels to log
122  */
123 #define FIO_IO_U_MAP_NR 8
124 #define FIO_IO_U_LAT_U_NR 10
125 #define FIO_IO_U_LAT_M_NR 12
126
127 struct thread_stat {
128         char *name;
129         char *verror;
130         int error;
131         int groupid;
132         pid_t pid;
133         char *description;
134         int members;
135
136         struct io_log *slat_log;
137         struct io_log *clat_log;
138         struct io_log *bw_log;
139
140         /*
141          * bandwidth and latency stats
142          */
143         struct io_stat clat_stat[2];            /* completion latency */
144         struct io_stat slat_stat[2];            /* submission latency */
145         struct io_stat bw_stat[2];              /* bandwidth stats */
146
147         unsigned long long stat_io_bytes[2];
148         struct timeval stat_sample_time[2];
149
150         /*
151          * fio system usage accounting
152          */
153         struct rusage ru_start;
154         struct rusage ru_end;
155         unsigned long usr_time;
156         unsigned long sys_time;
157         unsigned long ctx;
158         unsigned long minf, majf;
159
160         /*
161          * IO depth and latency stats
162          */
163         unsigned int io_u_map[FIO_IO_U_MAP_NR];
164         unsigned int io_u_submit[FIO_IO_U_MAP_NR];
165         unsigned int io_u_complete[FIO_IO_U_MAP_NR];
166         unsigned int io_u_lat_u[FIO_IO_U_LAT_U_NR];
167         unsigned int io_u_lat_m[FIO_IO_U_LAT_M_NR];
168         unsigned long total_io_u[2];
169         unsigned long short_io_u[2];
170         unsigned long total_submit;
171         unsigned long total_complete;
172
173         unsigned long long io_bytes[2];
174         unsigned long runtime[2];
175         unsigned long total_run_time;
176 };
177
178 struct bssplit {
179         unsigned int bs;
180         unsigned char perc;
181 };
182
183 struct thread_options {
184         int pad;
185         char *description;
186         char *name;
187         char *directory;
188         char *filename;
189         char *opendir;
190         char *ioengine;
191         enum td_ddir td_ddir;
192         unsigned int ddir_nr;
193         unsigned int iodepth;
194         unsigned int iodepth_low;
195         unsigned int iodepth_batch;
196         unsigned int iodepth_batch_complete;
197
198         unsigned long long size;
199         unsigned int fill_device;
200         unsigned long long file_size_low;
201         unsigned long long file_size_high;
202         unsigned long long start_offset;
203
204         unsigned int bs[2];
205         unsigned int ba[2];
206         unsigned int min_bs[2];
207         unsigned int max_bs[2];
208         struct bssplit *bssplit[2];
209         unsigned int bssplit_nr[2];
210
211         unsigned int nr_files;
212         unsigned int open_files;
213         enum file_lock_mode file_lock_mode;
214         unsigned int lockfile_batch;
215
216         unsigned int odirect;
217         unsigned int invalidate_cache;
218         unsigned int create_serialize;
219         unsigned int create_fsync;
220         unsigned int create_on_open;
221         unsigned int end_fsync;
222         unsigned int pre_read;
223         unsigned int sync_io;
224         unsigned int verify;
225         unsigned int do_verify;
226         unsigned int verifysort;
227         unsigned int verify_interval;
228         unsigned int verify_offset;
229         unsigned int verify_pattern;
230         unsigned int verify_pattern_bytes;
231         unsigned int verify_fatal;
232         unsigned int use_thread;
233         unsigned int unlink;
234         unsigned int do_disk_util;
235         unsigned int override_sync;
236         unsigned int rand_repeatable;
237         unsigned int write_lat_log;
238         unsigned int write_bw_log;
239         unsigned int norandommap;
240         unsigned int softrandommap;
241         unsigned int bs_unaligned;
242         unsigned int fsync_on_close;
243
244         unsigned int hugepage_size;
245         unsigned int rw_min_bs;
246         unsigned int thinktime;
247         unsigned int thinktime_spin;
248         unsigned int thinktime_blocks;
249         unsigned int fsync_blocks;
250         unsigned int start_delay;
251         unsigned long long timeout;
252         unsigned long long ramp_time;
253         unsigned int overwrite;
254         unsigned int bw_avg_time;
255         unsigned int loops;
256         unsigned long long zone_size;
257         unsigned long long zone_skip;
258         enum fio_memtype mem_type;
259
260         unsigned int stonewall;
261         unsigned int new_group;
262         unsigned int numjobs;
263         os_cpu_mask_t cpumask;
264         unsigned int cpumask_set;
265         unsigned int iolog;
266         unsigned int rwmixcycle;
267         unsigned int rwmix[2];
268         unsigned int nice;
269         unsigned int file_service_type;
270         unsigned int group_reporting;
271         unsigned int fadvise_hint;
272         unsigned int zero_buffers;
273         unsigned int refill_buffers;
274         unsigned int time_based;
275         unsigned int disable_clat;
276         unsigned int disable_slat;
277         unsigned int disable_bw;
278         unsigned int gtod_reduce;
279         unsigned int gtod_cpu;
280         unsigned int gtod_offload;
281
282         char *read_iolog_file;
283         char *write_iolog_file;
284         char *bw_log_file;
285         char *lat_log_file;
286
287         /*
288          * Pre-run and post-run shell
289          */
290         char *exec_prerun;
291         char *exec_postrun;
292
293         unsigned int rate;
294         unsigned int ratemin;
295         unsigned int ratecycle;
296         unsigned int rate_iops;
297         unsigned int rate_iops_min;
298
299         char *ioscheduler;
300
301         /*
302          * CPU "io" cycle burner
303          */
304         unsigned int cpuload;
305         unsigned int cpucycle;
306 };
307
308 #define FIO_VERROR_SIZE 128
309
310 /*
311  * This describes a single thread/process executing a fio job.
312  */
313 struct thread_data {
314         struct thread_options o;
315         char verror[FIO_VERROR_SIZE];
316         pthread_t thread;
317         int thread_number;
318         int groupid;
319         struct thread_stat ts;
320         struct fio_file **files;
321         unsigned int files_size;
322         unsigned int files_index;
323         unsigned int nr_open_files;
324         unsigned int nr_done_files;
325         unsigned int nr_normal_files;
326         union {
327                 unsigned int next_file;
328                 os_random_state_t next_file_state;
329         };
330         int error;
331         int done;
332         pid_t pid;
333         char *orig_buffer;
334         size_t orig_buffer_size;
335         volatile int terminate;
336         volatile int runstate;
337         unsigned int ioprio;
338         unsigned int ioprio_set;
339         unsigned int last_was_sync;
340
341         char *mmapfile;
342         int mmapfd;
343
344         void *iolog_buf;
345         FILE *iolog_f;
346
347         char *sysfs_root;
348
349         unsigned long rand_seeds[6];
350
351         os_random_state_t bsrange_state;
352         os_random_state_t verify_state;
353
354         int shm_id;
355
356         /*
357          * IO engine hooks, contains everything needed to submit an io_u
358          * to any of the available IO engines.
359          */
360         struct ioengine_ops *io_ops;
361
362         /*
363          * Current IO depth and list of free and busy io_u's.
364          */
365         unsigned int cur_depth;
366         unsigned int io_u_queued;
367         struct flist_head io_u_freelist;
368         struct flist_head io_u_busylist;
369         struct flist_head io_u_requeues;
370
371         /*
372          * Rate state
373          */
374         unsigned long rate_usec_cycle;
375         long rate_pending_usleep;
376         unsigned long rate_bytes;
377         unsigned long rate_blocks;
378         struct timeval lastrate;
379
380         unsigned long long total_io_size;
381
382         unsigned long io_issues[2];
383         unsigned long long io_blocks[2];
384         unsigned long long io_bytes[2];
385         unsigned long long io_skip_bytes;
386         unsigned long long this_io_bytes[2];
387         unsigned long long zone_bytes;
388         struct fio_mutex *mutex;
389
390         /*
391          * State for random io, a bitmap of blocks done vs not done
392          */
393         os_random_state_t random_state;
394
395         struct timeval start;   /* start of this loop */
396         struct timeval epoch;   /* time job was started */
397         struct timeval rw_end[2];
398         struct timeval last_issue;
399         struct timeval tv_cache;
400         unsigned int tv_cache_nr;
401         unsigned int tv_cache_mask;
402         unsigned int rw_end_set[2];
403         unsigned int ramp_time_over;
404
405         /*
406          * read/write mixed workload state
407          */
408         os_random_state_t rwmix_state;
409         unsigned long rwmix_issues;
410         enum fio_ddir rwmix_ddir;
411         unsigned int ddir_nr;
412
413         /*
414          * IO history logs for verification. We use a tree for sorting,
415          * if we are overwriting. Otherwise just use a fifo.
416          */
417         struct rb_root io_hist_tree;
418         struct flist_head io_hist_list;
419
420         /*
421          * For IO replaying
422          */
423         struct flist_head io_log_list;
424
425         /*
426          * for fileservice, how often to switch to a new file
427          */
428         unsigned int file_service_nr;
429         unsigned int file_service_left;
430         struct fio_file *file_service_file;
431
432         /*
433          * For generating file sizes
434          */
435         os_random_state_t file_size_state;
436 };
437
438 /*
439  * roundrobin available files, or choose one at random, or do each one
440  * serially.
441  */
442 enum {
443         FIO_FSERVICE_RANDOM     = 1,
444         FIO_FSERVICE_RR         = 2,
445         FIO_FSERVICE_SEQ        = 3,
446 };
447
448 /*
449  * when should interactive ETA output be generated
450  */
451 enum {
452         FIO_ETA_AUTO,
453         FIO_ETA_ALWAYS,
454         FIO_ETA_NEVER,
455 };
456
457 #define __td_verror(td, err, msg, func)                                 \
458         do {                                                            \
459                 if ((td)->error)                                        \
460                         break;                                          \
461                 int e = (err);                                          \
462                 (td)->error = e;                                        \
463                 snprintf(td->verror, sizeof(td->verror) - 1, "file:%s:%d, func=%s, error=%s", __FILE__, __LINE__, (func), (msg));       \
464         } while (0)
465
466
467 #define td_verror(td, err, func)        \
468         __td_verror((td), (err), strerror((err)), (func))
469 #define td_vmsg(td, err, msg, func)     \
470         __td_verror((td), (err), (msg), (func))
471
472 extern int exitall_on_terminate;
473 extern int thread_number;
474 extern int nr_process, nr_thread;
475 extern int shm_id;
476 extern int groupid;
477 extern int terse_output;
478 extern int temp_stall_ts;
479 extern unsigned long long mlock_size;
480 extern unsigned long page_mask, page_size;
481 extern int read_only;
482 extern int eta_print;
483 extern unsigned long done_secs;
484 extern char *job_section;
485 extern int fio_gtod_offload;
486 extern int fio_gtod_cpu;
487
488 extern struct thread_data *threads;
489
490 #define td_read(td)             ((td)->o.td_ddir & TD_DDIR_READ)
491 #define td_write(td)            ((td)->o.td_ddir & TD_DDIR_WRITE)
492 #define td_rw(td)               (((td)->o.td_ddir & TD_DDIR_RW) == TD_DDIR_RW)
493 #define td_random(td)           ((td)->o.td_ddir & TD_DDIR_RAND)
494 #define file_randommap(td, f)   (!(td)->o.norandommap && (f)->file_map)
495
496 static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
497 {
498         assert(!(io_u->ddir == DDIR_WRITE && !td_write(td)));
499 }
500
501 #define BLOCKS_PER_MAP          (8 * sizeof(int))
502 #define TO_MAP_BLOCK(f, b)      (b)
503 #define RAND_MAP_IDX(f, b)      (TO_MAP_BLOCK(f, b) / BLOCKS_PER_MAP)
504 #define RAND_MAP_BIT(f, b)      (TO_MAP_BLOCK(f, b) & (BLOCKS_PER_MAP - 1))
505
506 #define MAX_JOBS        (1024)
507
508 static inline int should_fsync(struct thread_data *td)
509 {
510         if (td->last_was_sync)
511                 return 0;
512         if (td->o.odirect)
513                 return 0;
514         if (td_write(td) || td_rw(td) || td->o.override_sync)
515                 return 1;
516
517         return 0;
518 }
519
520 /*
521  * Disk utils as read in /sys/block/<dev>/stat
522  */
523 struct disk_util_stat {
524         unsigned ios[2];
525         unsigned merges[2];
526         unsigned long long sectors[2];
527         unsigned ticks[2];
528         unsigned io_ticks;
529         unsigned time_in_queue;
530 };
531
532 /*
533  * Per-device disk util management
534  */
535 struct disk_util {
536         struct flist_head list;
537         /* If this disk is a slave, hook it into the master's
538          * list using this head.
539          */
540         struct flist_head slavelist;
541
542         char *name;
543         char *sysfs_root;
544         char path[256];
545         int major, minor;
546
547         struct disk_util_stat dus;
548         struct disk_util_stat last_dus;
549
550         /* For software raids, this entry maintains pointers to the
551          * entries for the slave devices. The disk_util entries for
552          * the slaves devices should primarily be maintained through
553          * the disk_list list, i.e. for memory allocation and
554          * de-allocation, etc. Whereas this list should be used only
555          * for aggregating a software RAID's disk util figures.
556          */
557         struct flist_head slaves;
558
559         unsigned long msec;
560         struct timeval time;
561
562         struct fio_mutex *lock;
563         unsigned long users;
564 };
565
566 static inline void disk_util_inc(struct disk_util *du)
567 {
568         if (du) {
569                 fio_mutex_down(du->lock);
570                 du->users++;
571                 fio_mutex_up(du->lock);
572         }
573 }
574
575 static inline void disk_util_dec(struct disk_util *du)
576 {
577         if (du) {
578                 fio_mutex_down(du->lock);
579                 du->users--;
580                 fio_mutex_up(du->lock);
581         }
582 }
583
584 #define DISK_UTIL_MSEC  (250)
585
586 /*
587  * Log exports
588  */
589 enum file_log_act {
590         FIO_LOG_ADD_FILE,
591         FIO_LOG_OPEN_FILE,
592         FIO_LOG_CLOSE_FILE,
593         FIO_LOG_UNLINK_FILE,
594 };
595
596 extern int __must_check read_iolog_get(struct thread_data *, struct io_u *);
597 extern void log_io_u(struct thread_data *, struct io_u *);
598 extern void log_file(struct thread_data *, struct fio_file *, enum file_log_act);
599 extern int __must_check init_iolog(struct thread_data *td);
600 extern void log_io_piece(struct thread_data *, struct io_u *);
601 extern void queue_io_piece(struct thread_data *, struct io_piece *);
602 extern void prune_io_piece_log(struct thread_data *);
603 extern void write_iolog_close(struct thread_data *);
604
605 /*
606  * Logging
607  */
608 extern void add_clat_sample(struct thread_data *, enum fio_ddir, unsigned long,
609                                 unsigned int);
610 extern void add_slat_sample(struct thread_data *, enum fio_ddir, unsigned long,
611                                 unsigned int);
612 extern void add_bw_sample(struct thread_data *, enum fio_ddir, unsigned int,
613                                 struct timeval *);
614 extern void show_run_stats(void);
615 extern void init_disk_util(struct thread_data *);
616 extern void update_rusage_stat(struct thread_data *);
617 extern void update_io_ticks(void);
618 extern void setup_log(struct io_log **);
619 extern void finish_log(struct thread_data *, struct io_log *, const char *);
620 extern void finish_log_named(struct thread_data *, struct io_log *, const char *, const char *);
621 extern void __finish_log(struct io_log *, const char *);
622 extern struct io_log *agg_io_log[2];
623 extern int write_bw_log;
624 extern void add_agg_sample(unsigned long, enum fio_ddir, unsigned int);
625
626 /*
627  * Time functions
628  */
629 extern unsigned long long utime_since(struct timeval *, struct timeval *);
630 extern unsigned long long utime_since_now(struct timeval *);
631 extern unsigned long mtime_since(struct timeval *, struct timeval *);
632 extern unsigned long mtime_since_now(struct timeval *);
633 extern unsigned long time_since_now(struct timeval *);
634 extern unsigned long mtime_since_genesis(void);
635 extern void usec_spin(unsigned int);
636 extern void usec_sleep(struct thread_data *, unsigned long);
637 extern void rate_throttle(struct thread_data *, unsigned long, unsigned int);
638 extern void fill_start_time(struct timeval *);
639 extern void fio_gettime(struct timeval *, void *);
640 extern void fio_gtod_init(void);
641 extern void fio_gtod_update(void);
642 extern void set_genesis_time(void);
643 extern int ramp_time_over(struct thread_data *);
644 extern int in_ramp_time(struct thread_data *);
645
646 /*
647  * Init/option functions
648  */
649 extern int __must_check parse_options(int, char **);
650 extern int fio_options_parse(struct thread_data *, char **, int);
651 extern int fio_cmd_option_parse(struct thread_data *, const char *, char *);
652 extern void fio_fill_default_options(struct thread_data *);
653 extern int fio_show_option_help(const char *);
654 extern void fio_options_dup_and_init(struct option *);
655 extern void options_mem_dupe(struct thread_data *);
656 extern void options_mem_free(struct thread_data *);
657 extern void td_fill_rand_seeds(struct thread_data *);
658 #define FIO_GETOPT_JOB          0x89988998
659 #define FIO_NR_OPTIONS          128
660
661 /*
662  * ETA/status stuff
663  */
664 extern void print_thread_status(void);
665 extern void print_status_init(int);
666
667 /*
668  * disk util stuff
669  */
670 #ifdef FIO_HAVE_DISK_UTIL
671 extern void show_disk_util(void);
672 extern void init_disk_util(struct thread_data *);
673 extern void update_io_ticks(void);
674 #else
675 #define show_disk_util()
676 #define init_disk_util(td)
677 #define update_io_ticks()
678 #endif
679
680 /*
681  * Thread life cycle. Once a thread has a runstate beyond TD_INITIALIZED, it
682  * will never back again. It may cycle between running/verififying/fsyncing.
683  * Once the thread reaches TD_EXITED, it is just waiting for the core to
684  * reap it.
685  */
686 enum {
687         TD_NOT_CREATED = 0,
688         TD_CREATED,
689         TD_INITIALIZED,
690         TD_RAMP,
691         TD_RUNNING,
692         TD_PRE_READING,
693         TD_VERIFYING,
694         TD_FSYNCING,
695         TD_EXITED,
696         TD_REAPED,
697 };
698
699 extern void td_set_runstate(struct thread_data *, int);
700
701 /*
702  * Memory helpers
703  */
704 extern int __must_check fio_pin_memory(void);
705 extern void fio_unpin_memory(void);
706 extern int __must_check allocate_io_mem(struct thread_data *);
707 extern void free_io_mem(struct thread_data *);
708
709 /*
710  * Reset stats after ramp time completes
711  */
712 extern void reset_all_stats(struct thread_data *);
713
714 /*
715  * blktrace support
716  */
717 #ifdef FIO_HAVE_BLKTRACE
718 extern int is_blktrace(const char *);
719 extern int load_blktrace(struct thread_data *, const char *);
720 #endif
721
722 /*
723  * Mark unused variables passed to ops functions as unused, to silence gcc
724  */
725 #define fio_unused      __attribute((__unused__))
726 #define fio_init        __attribute__((constructor))
727 #define fio_exit        __attribute__((destructor))
728
729 #define for_each_td(td, i)      \
730         for ((i) = 0, (td) = &threads[0]; (i) < (int) thread_number; (i)++, (td)++)
731 #define for_each_file(td, f, i) \
732         if ((td)->files_index)                                          \
733                 for ((i) = 0, (f) = (td)->files[0];                     \
734                  (i) < (td)->o.nr_files && ((f) = (td)->files[i]) != NULL; \
735                  (i)++)
736
737 #define fio_assert(td, cond)    do {    \
738         if (!(cond)) {                  \
739                 int *__foo = NULL;      \
740                 fprintf(stderr, "file:%s:%d, assert %s failed\n", __FILE__, __LINE__, #cond);   \
741                 (td)->runstate = TD_EXITED;     \
742                 (td)->error = EFAULT;           \
743                 *__foo = 0;                     \
744         }       \
745 } while (0)
746
747 static inline void fio_file_reset(struct fio_file *f)
748 {
749         f->last_free_lookup = 0;
750         f->last_pos = f->file_offset;
751         if (f->file_map)
752                 memset(f->file_map, 0, f->num_maps * sizeof(int));
753 }
754
755 static inline void clear_error(struct thread_data *td)
756 {
757         td->error = 0;
758         td->verror[0] = '\0';
759 }
760
761 #ifdef FIO_INC_DEBUG
762 static inline void dprint_io_u(struct io_u *io_u, const char *p)
763 {
764         struct fio_file *f = io_u->file;
765
766         dprint(FD_IO, "%s: io_u %p: off=%llu/len=%lu/ddir=%d", p, io_u,
767                                         (unsigned long long) io_u->offset,
768                                         io_u->buflen, io_u->ddir);
769         if (fio_debug & (1 << FD_IO)) {
770                 if (f)
771                         log_info("/%s", f->file_name);
772
773                 log_info("\n");
774         }
775 }
776 #else
777 #define dprint_io_u(io_u, p)
778 #endif
779
780 static inline int fio_fill_issue_time(struct thread_data *td)
781 {
782         if (td->o.read_iolog_file ||
783             !td->o.disable_clat || !td->o.disable_slat || !td->o.disable_bw)
784                 return 1;
785
786         return 0;
787 }
788
789 #endif