Recent changes (master)
The following changes since commit 8aa89d70f44eb3fe9d9581fd9bcc3cebca22621b:
Various cleanups (2016-08-15 23:36:11 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to c22825bb537af1f84a18dcb4af6d8c6844f751ac:
Fix backwards reads with --size smaller than the file size (2016-08-16 15:22:17 -0600)
----------------------------------------------------------------
Jens Axboe (3):
Merge branch 'histogram-delta' of https://github.com/cronburg/fio into histogram
histogram: style and list fixups
Fix backwards reads with --size smaller than the file size
Karl Cronburg (1):
Make histogram samples non-cumulative by tracking a linked-list of the most recent histogram and differencing it when we print to the log file(s). Linked list of pointers used to minimize runtime impact on recording side, instead choosing to do subtraction on the logging (when logs get printed to file) side.
io_u.c | 18 ++++++++++--- iolog.c | 44 +++++++++++++++++++++++++------- iolog.h | 1 + stat.c | 9 ++++--- stat.h | 5 ++++ tools/hist/fiologparser_hist.py | 56 ++++++++++------------------------------- 6 files changed, 73 insertions(+), 60 deletions(-)
---
Diff of recent changes:
io_u.c +14 -4
@@ -362,8 +362,12 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,if (f->last_pos[ddir] < f->real_file_size) {uint64_t pos; -if (f->last_pos[ddir] == f->file_offset && o->ddir_seq_add <0 ) - f->last_pos[ddir] = f->real_file_size; +if (f->last_pos[ddir] == f->file_offset && o->ddir_seq_add <0 ) { +if (f->real_file_size > f->io_size) + f->last_pos[ddir] = f->io_size; +else + f->last_pos[ddir] = f->real_file_size; + } pos = f->last_pos[ddir] - f->file_offset;if (pos && o->ddir_seq_add) {
@@ -378,8 +382,14 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,if (pos >= f->real_file_size) {if (o->ddir_seq_add >0 ) pos = f->file_offset; -else - pos = f->real_file_size + o->ddir_seq_add; +else { +if (f->real_file_size > f->io_size) + pos = f->io_size; +else + pos = f->real_file_size; + + pos += o->ddir_seq_add; + } } }
iolog.c +35 -9
82 lines not on this page · raw message
iolog.h +1 -0
@@ -21,6 +21,7 @@ struct io_stat {struct io_hist {uint64_t samples;unsigned long hist_last; +struct flist_head list; };/*
stat.c +5 -4
@@ -2221,7 +2221,7 @@ void add_clat_sample(struct thread_data *td, enum fio_ddir ddir,if (this_window >= iolog->hist_msec) {unsigned int *io_u_plat; -unsigned int *dst; +struct io_u_plat_entry *dst;/* * Make a byte-for-byte copy of the latency histogram
@@ -2231,10 +2231,11 @@ void add_clat_sample(struct thread_data *td, enum fio_ddir ddir,* log file. */ io_u_plat = (unsigned int *) td->ts.io_u_plat[ddir]; - dst =malloc (FIO_IO_U_PLAT_NR *sizeof (unsigned int )); -memcpy (dst, io_u_plat, + dst =malloc (sizeof (struct io_u_plat_entry )); +memcpy (&(dst->io_u_plat), io_u_plat,FIO_IO_U_PLAT_NR *sizeof (unsigned int )); -__add_log_sample (iolog, (unsigned long )dst, ddir, bs, +flist_add (&dst->list, &hw->list); +__add_log_sample (iolog, (unsigned long )dst, ddir, bs, elapsed, offset);/*
stat.h +5 -0
@@ -240,6 +240,11 @@ struct jobs_eta {uint8_t run_str[]; } __attribute__((packed)); +struct io_u_plat_entry { +struct flist_head list; +unsigned int io_u_plat[FIO_IO_U_PLAT_NR ]; +}; +extern struct fio_mutex *stat_mutex;extern struct jobs_eta *get_jobs_eta (bool force,size_t *size);
tools/hist/fiologparser_hist.py +13 -43
98 lines not on this page · raw message