Recent changes (master)
The following changes since commit cf6b7fb4f1883af9cbc443ed2536e7454ed51215:
t/time-test: cleanups (2017-06-22 19:29:35 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to a2c95580b468a1ddd72ecb5532aca7d94f6efa5b:
stat: Add iops stat and sample number information to terse format (2017-06-23 16:31:02 -0600)
----------------------------------------------------------------
Andreas Herrmann (4):
stat: Print one-line iops stat
stat: Print number of samples in bw and iops stats
stat: Merge show_thread_status_terse_* functions
stat: Add iops stat and sample number information to terse format
Tomohiro Kusumi (7):
Makefile: use fmt(1) rather than tr(1) on NetBSD/etc
server: don't use void* for pointer arithmetic (gcc)
io_u: don't use void* for pointer arithmetic (gcc)
init: don't use void* for pointer arithmetic (gcc)
client: don't use void* for pointer arithmetic (gcc)
verify: don't use void* for pointer arithmetic (gcc)
smalloc: don't use void* for pointer arithmetic (gcc)
HOWTO | 19 +++++--- Makefile | 10 ++++ client.c | 13 +++--- fio.1 | 26 ++++++++--- init.c | 6 +-- io_u.c | 2 +- server.c | 6 ++- server.h | 2 +- smalloc.c | 2 +- stat.c | 139 +++++++++++++++++++++++-------------------------------- t/verify-state.c | 3 +- verify-state.h | 2 +- verify.c | 7 +-- 13 files changed, 126 insertions(+), 111 deletions(-)
---
Diff of recent changes:
HOWTO +13 -6
@@ -127,7 +127,7 @@ Command line options .. option:: --terse-version=type - Set terse version output format (default 3, or 2 or 4). + Set terse version output format (default 3, or 2 or 4 or 5). .. option:: --version
@@ -3168,11 +3168,12 @@ first value is the version of the terse output format. If the output has to be changed for some reason, this number will be incremented by 1 to signify that change. -Split up, the format is as follows: +Split up, the format is as follows (comments in brackets denote when a +field was introduced or whether its specific to some terse version): :: - terse version, fio version, jobname, groupid, error + terse version, fio version [v3], jobname, groupid, error READ status::
@@ -3181,7 +3182,8 @@ Split up, the format is as follows: Completion latency: min, max, mean, stdev (usec) Completion latency percentiles: 20 fields (see below) Total latency: min, max, mean, stdev (usec) - Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev + Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev, number of samples [v5] + IOPS [v5]: min, max, mean, stdev, number of samples WRITE status:
@@ -3192,7 +3194,12 @@ Split up, the format is as follows: Completion latency: min, max, mean, stdev (usec) Completion latency percentiles: 20 fields (see below) Total latency: min, max, mean, stdev (usec) - Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev + Bw (KiB/s): min, max, aggregate percentage of total, mean, stdev, number of samples [v5] + IOPS [v5]: min, max, mean, stdev, number of samples + + TRIM status [all but version 3]: + + Fields are similar to READ/WRITE status. CPU usage::
@@ -3210,7 +3217,7 @@ Split up, the format is as follows: <=2, 4, 10, 20, 50, 100, 250, 500, 750, 1000, 2000, >=2000 - Disk utilization:: + Disk utilization [v3]:: Disk name, Read ios, write ios, Read merges, write merges,
Makefile +10 -0
@@ -327,8 +327,13 @@ override CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"' @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d @mv -f $*.d $*.d.tmp @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d +ifeq ($(CONFIG_TARGET_OS), NetBSD) + @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \ + sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d +else @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d +endif @rm -f $*.d.tmp ifdef CONFIG_ARITHMETIC
@@ -366,8 +371,13 @@ init.o: init.c FIO-VERSION-FILE @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d @mv -f $*.d $*.d.tmp @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d +ifeq ($(CONFIG_TARGET_OS), NetBSD) + @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \ + sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d +else @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $*.d +endif @rm -f $*.d.tmp gcompat.o: gcompat.c gcompat.h
client.c +7 -6
@@ -885,6 +885,7 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)convert_io_stat (&dst->slat_stat[i], &src->slat_stat[i]);convert_io_stat (&dst->lat_stat[i], &src->lat_stat[i]);convert_io_stat (&dst->bw_stat[i], &src->bw_stat[i]); +convert_io_stat (&dst->iops_stat[i], &src->iops_stat[i]); } dst->usr_time =le64_to_cpu (src->usr_time);
@@ -1452,7 +1453,7 @@ static struct cmd_iolog_pdu *convert_iolog_gz(struct fio_net_cmd *cmd,z_stream stream;uint32_t nr_samples;size_t total; -void *p; +char *p; stream.zalloc =Z_NULL ; stream.zfree =Z_NULL ;
@@ -1478,10 +1479,10 @@ static struct cmd_iolog_pdu *convert_iolog_gz(struct fio_net_cmd *cmd,memcpy (ret, pdu,sizeof (*pdu)); - p = (void *) ret +sizeof (*pdu); + p = (char *) ret +sizeof (*pdu); stream.avail_in = cmd->pdu_len -sizeof (*pdu); - stream.next_in = (void *) pdu +sizeof (*pdu); + stream.next_in = (void *)((char *) pdu +sizeof (*pdu));while (stream.avail_in) {unsigned int this_chunk =65536 ;unsigned int this_len;
@@ -1491,7 +1492,7 @@ static struct cmd_iolog_pdu *convert_iolog_gz(struct fio_net_cmd *cmd, this_chunk = total; stream.avail_out = this_chunk; - stream.next_out = p; + stream.next_out = (void *)p; err =inflate (&stream,Z_NO_FLUSH );/* may be Z_OK, or Z_STREAM_END */ if (err <0 ) {
@@ -1566,7 +1567,7 @@ static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd, s =__get_sample (samples, ret->log_offset, i);if (ret->log_type ==IO_LOG_TYPE_HIST ) - s = (struct io_sample *)((void *)s +sizeof (struct io_u_plat_entry ) * i); + s = (struct io_sample *)((char *)s +sizeof (struct io_u_plat_entry ) * i); s->time =le64_to_cpu (s->time); s->data.val =le64_to_cpu (s->data.val);
@@ -1580,7 +1581,7 @@ static struct cmd_iolog_pdu *convert_iolog(struct fio_net_cmd *cmd, }if (ret->log_type ==IO_LOG_TYPE_HIST ) { - s->data.plat_entry = (struct io_u_plat_entry *)(((void *)s) +sizeof (*s)); + s->data.plat_entry = (struct io_u_plat_entry *)(((char *)s) +sizeof (*s)); s->data.plat_entry->list.next =NULL ; s->data.plat_entry->list.prev =NULL ; }
fio.1 +20 -6
@@ -43,7 +43,7 @@ Deprecated, use \-\-output-format instead to select multiple formats. Display version information and exit. .TP .BI \-\-terse\-version \fR=\fPversion -Set terse version output format (default 3, or 2 or 4) +Set terse version output format (default 3, or 2, 4, 5) .TP .B \-\-help Display usage information and exit.
@@ -2161,10 +2161,11 @@ scripted use. A job description (if provided) follows on a new line. Note that the first number in the line is the version number. If the output has to be changed for some reason, this number will be incremented by 1 to signify that -change. The fields are: +change. Numbers in brackets (e.g. "[v3]") indicate which terse version +introduced a field. The fields are: .P .RS -.B terse version, fio version, jobname, groupid, error +.B terse version, fio version [v3], jobname, groupid, error .P Read status: .RS
@@ -2188,7 +2189,11 @@ Total latency: .RE Bandwidth: .RS -.B min, max, aggregate percentage of total, mean, standard deviation +.B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5] +.RE +IOPS [v5]: +.RS +.B min, max, mean, standard deviation, number of samples .RE .RE .P
@@ -2214,10 +2219,19 @@ Total latency: .RE Bandwidth: .RS -.B min, max, aggregate percentage of total, mean, standard deviation +.B min, max, aggregate percentage of total, mean, standard deviation, number of samples [v5] +.RE +IOPS [v5]: +.RS +.B min, max, mean, standard deviation, number of samples .RE .RE .P +Trim status [all but version 3]: +.RS +Similar to Read/Write status but for trims. +.RE +.P CPU usage: .RS .B user, system, context switches, major page faults, minor page faults
@@ -2240,7 +2254,7 @@ Milliseconds: .RE .RE .P -Disk utilization (1 for each disk used): +Disk utilization (1 for each disk used) [v3]: .RS .B name, read ios, write ios, read merges, write merges, read ticks, write ticks, read in-queue time, write in-queue time, disk utilization percentage .RE
init.c +3 -3
@@ -361,7 +361,7 @@ static int setup_thread_area(void)#endif memset (threads,0 , max_jobs *sizeof (struct thread_data )); - fio_debug_jobp = (void *) threads + max_jobs *sizeof (struct thread_data ); + fio_debug_jobp = (unsigned int *)(threads + max_jobs); *fio_debug_jobp =-1 ;flow_init ();
@@ -1364,6 +1364,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, td->ts.slat_stat[i].min_val =ULONG_MAX ; td->ts.lat_stat[i].min_val =ULONG_MAX ; td->ts.bw_stat[i].min_val =ULONG_MAX ; + td->ts.iops_stat[i].min_val =ULONG_MAX ; } td->ddir_seq_nr = o->ddir_seq_nr;
@@ -2403,8 +2404,7 @@ int parse_cmd_line(int argc, char *argv[], int client_type)break ;case 'V' : terse_version =atoi (optarg); -if (!(terse_version ==2 || terse_version ==3 || - terse_version ==4 )) { +if (!(terse_version >=2 && terse_version <=5 )) {log_err ("fio: bad terse version format\n" ); exit_val =1 ; do_exit++;
io_u.c +1 -1
@@ -1602,7 +1602,7 @@ static void small_content_scramble(struct io_u *io_u)unsigned int i, nr_blocks = io_u->buflen /512 ;uint64_t boffset;unsigned int offset; -void *p, *end; +char *p, *end;if (!nr_blocks)return ;
server.c +4 -2
@@ -252,9 +252,10 @@ static int fio_send_data(int sk, const void *p, unsigned int len)return fio_sendv_data (sk, &iov,1 ); } -static int fio_recv_data (int sk,void *p,unsigned int len,bool wait) +static int fio_recv_data (int sk,void *buf,unsigned int len,bool wait) {int flags; +char *p = buf;if (wait) flags =MSG_WAITALL ;
@@ -377,7 +378,7 @@ struct fio_net_cmd *fio_net_recv_cmd(int sk, bool wait)break ;/* There's payload, get it */ - pdu = (void *) cmdret->payload + pdu_offset; + pdu = (char *) cmdret->payload + pdu_offset; ret =fio_recv_data (sk, pdu, cmd.pdu_len, wait);if (ret)break ;
@@ -1474,6 +1475,7 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)convert_io_stat (&p.ts.slat_stat[i], &ts->slat_stat[i]);convert_io_stat (&p.ts.lat_stat[i], &ts->lat_stat[i]);convert_io_stat (&p.ts.bw_stat[i], &ts->bw_stat[i]); +convert_io_stat (&p.ts.iops_stat[i], &ts->iops_stat[i]); } p.ts.usr_time =cpu_to_le64 (ts->usr_time);
server.h +1 -1
@@ -49,7 +49,7 @@ struct fio_net_cmd_reply { };enum { -FIO_SERVER_VER =64 , +FIO_SERVER_VER =65 ,FIO_SERVER_MAX_FRAGMENT_PDU =1024 ,FIO_SERVER_MAX_CMD_MB =2048 ,
smalloc.c +1 -1
@@ -189,7 +189,7 @@ static bool add_pool(struct pool *pool, unsigned int alloc_size) goto out_fail; pool->map = ptr; - pool->bitmap = (void *) ptr + (pool->nr_blocks *SMALLOC_BPL ); + pool->bitmap = (unsigned int *)((char *) ptr + (pool->nr_blocks *SMALLOC_BPL ));memset (pool->bitmap,0 , bitmap_blocks *sizeof (unsigned int )); pool->lock =fio_mutex_init (FIO_MUTEX_UNLOCKED );
stat.c +59 -80
221 lines not on this page · raw message
t/verify-state.c +2 -1
@@ -58,7 +58,8 @@ static void show(struct thread_io_list *s, size_t size)show_s (s, no_s); no_s++; size -=__thread_io_list_sz (s->depth, s->nofiles); - s = (void *) s +__thread_io_list_sz (s->depth, s->nofiles); + s = (struct thread_io_list *)((char *) s + +__thread_io_list_sz (s->depth, s->nofiles)); }while (size !=0 ); }
verify-state.h +1 -1
@@ -77,7 +77,7 @@ static inline size_t thread_io_list_sz(struct thread_io_list *s)static inline struct thread_io_list *io_list_next (struct thread_io_list *s) { -return (void *) s +thread_io_list_sz (s); +return (struct thread_io_list *)((char *) s +thread_io_list_sz (s)); } static inline void verify_state_gen_name(char *out, size_t size,
verify.c +4 -3
@@ -388,7 +388,7 @@ static int verify_io_u_pattern(struct verify_header *hdr, struct vcont *vc) (void )paste_format_inplace (pattern, pattern_size, td->o.verify_fmt, td->o.verify_fmt_sz, io_u); - buf = (void *) hdr + header_size; + buf = (char *) hdr + header_size; len =get_hdr_inc (td, io_u) - header_size; mod = (get_hdr_inc (td, io_u) * vc->hdr_num + header_size) % pattern_size;
@@ -1188,9 +1188,10 @@ static void populate_hdr(struct thread_data *td, struct io_u *io_u, unsigned int header_len) {unsigned int data_len; -void *data, *p; +void *data; +char *p; - p = (void *) hdr; + p = (char *) hdr;fill_hdr (td, io_u, hdr, header_num, header_len, io_u->rand_seed);