X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio.h;h=63cd83f5e1be23d4548739a682947667f131533e;hp=22aaf345ae8daa093df160a7f10523702d0c5e1c;hb=5e28df3cb6fb0c6bda2d8f98084734462be7ae46;hpb=3845591fadea480177223e28c9d1c03642d34f0e diff --git a/fio.h b/fio.h index 22aaf345..63cd83f5 100644 --- a/fio.h +++ b/fio.h @@ -473,6 +473,7 @@ struct thread_options { unsigned int fsync_blocks; unsigned int start_delay; unsigned long long timeout; + unsigned long long ramp_time; unsigned int overwrite; unsigned int bw_avg_time; unsigned int loops; @@ -609,6 +610,7 @@ struct thread_data { struct timeval rw_end[2]; struct timeval last_issue; unsigned int rw_end_set[2]; + unsigned int ramp_time_over; /* * read/write mixed workload state @@ -751,6 +753,10 @@ struct disk_util_stat { */ struct disk_util { struct flist_head list; + /* If this disk is a slave, hook it into the master's + * list using this head. + */ + struct flist_head slavelist; char *name; char *sysfs_root; @@ -760,6 +766,15 @@ struct disk_util { struct disk_util_stat dus; struct disk_util_stat last_dus; + /* For software raids, this entry maintains pointers to the + * entries for the slave devices. The disk_util entries for + * the slaves devices should primarily be maintained through + * the disk_list list, i.e. for memory allocation and + * de-allocation, etc. Whereas this list should be used only + * for aggregating a software RAID's disk util figures. + */ + struct flist_head slaves; + unsigned long msec; struct timeval time; }; @@ -817,6 +832,8 @@ extern void rate_throttle(struct thread_data *, unsigned long, unsigned int); extern void fill_start_time(struct timeval *); extern void fio_gettime(struct timeval *, void *); extern void set_genesis_time(void); +extern int ramp_time_over(struct thread_data *); +extern int in_ramp_time(struct thread_data *); /* * Init/option functions @@ -883,6 +900,7 @@ enum { TD_NOT_CREATED = 0, TD_CREATED, TD_INITIALIZED, + TD_RAMP, TD_RUNNING, TD_VERIFYING, TD_FSYNCING, @@ -890,6 +908,8 @@ enum { TD_REAPED, }; +extern void td_set_runstate(struct thread_data *, int); + /* * Verify helpers */ @@ -924,6 +944,11 @@ extern void io_u_fill_buffer(struct thread_data *td, struct io_u *, unsigned int void io_u_mark_complete(struct thread_data *, unsigned int); void io_u_mark_submit(struct thread_data *, unsigned int); +/* + * Reset stats after ramp time completes + */ +extern void reset_all_stats(struct thread_data *); + /* * io engine entry points */