Recent changes (master)
The following changes since commit c20c361255683ee138f0c239e48b315e25725f7e:
server: initialize first iolog header properly (2017-12-13 08:44:34 -0700)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to db37d89074ed204c9c2bd010e72f63dcf4725715:
Allow configurable ETA intervals (2017-12-14 11:51:41 -0700)
----------------------------------------------------------------
Jeff Furlong (1):
Fix Windows local time
Jens Axboe (4):
server: cleanup iolog pdu prep
server: convert more memset to on-stack initialization
client: respect --eta=never for networked connections Allow configurable ETA intervals
Robert Elliott (1):
.gitignore: ignore tags files and additional output binaries
.gitignore | 12 ++++++++++ HOWTO | 11 ++++++++- client.c | 5 +++- eta.c | 13 +++++++---- fio.1 | 9 +++++++- fio.h | 3 +++ init.c | 29 +++++++++++++++++++++++ os/windows/posix.c | 4 +++- server.c | 68 +++++++++++++++++++++++++----------------------------- 9 files changed, 110 insertions(+), 44 deletions(-)
---
Diff of recent changes:
.gitignore +12 -0
@@ -8,7 +8,19 @@ /config.log /cscope.out /fio +/gfio +/t/axmap +/t/fio-btrace2fio +/t/fio-dedupe +/t/fio-genzipf +/t/fio-verify-state +/t/gen-rand +/t/ieee754 +/t/lfsr-test +/t/stest y.tab.* lex.yy.c *.un~ doc/output +/tags +/TAGS
HOWTO +10 -1
@@ -173,7 +173,16 @@ Command line options .. option:: --eta=when Specifies when real-time ETA estimate should be printed. `when` may be - `always`, `never` or `auto`. + `always`, `never` or `auto`. `auto` is the default, it prints ETA + when requested if the output is a TTY. `always` disregards the output + type, and prints ETA when requested. `never` never prints ETA. + +.. option:: --eta-interval=time + + By default, fio requests client ETA status roughly every second. With + this option, the interval is configurable. Fio imposes a minimum + allowed time to avoid flooding the console, less than 250 msec is + not supported. .. option:: --eta-newline=time
client.c +4 -1
@@ -1834,6 +1834,9 @@ static void request_client_etas(struct client_ops *ops)struct client_eta *eta;int skipped =0 ; +if (eta_print ==FIO_ETA_NEVER ) +return ; +dprint (FD_NET ,"client: request eta (%d)\n" , nr_clients); eta =calloc (1 ,sizeof (*eta) +__THREAD_RUNSTR_SZ (REAL_MAX_JOBS ));
@@ -1997,7 +2000,7 @@ int fio_handle_clients(struct client_ops *ops)int timeout;fio_gettime (&ts,NULL ); -if (mtime_since (&eta_ts, &ts) >=900 ) { +if (eta_time_within_slack (mtime_since (&eta_ts, &ts))) {request_client_etas (ops);memcpy (&eta_ts, &ts,sizeof (ts));
eta.c +9 -4
@@ -348,6 +348,14 @@ static void calc_iops(int unified_rw_rep, unsigned long mtime, }/* +* Allow a little slack - if we're within 95% of the time, allow ETA. +*/ +bool eta_time_within_slack (unsigned int time) +{ +return time > ((eta_interval_msec *95 ) /100 ); +} + +/* * Print status of the jobs we know about. This includes rate estimates, * ETA, thread state, etc. */
@@ -489,10 +497,7 @@ bool calc_thread_status(struct jobs_eta *je, int force) disp_time =mtime_since (&disp_prev_time, &now); -/* -* Allow a little slack, the target is to print it every 1000 msecs -*/ -if (!force && disp_time <900 ) +if (!force && !eta_time_within_slack (disp_time))return false;calc_rate (unified_rw_rep, disp_time, io_bytes, disp_io_bytes, je->rate);
fio.1 +8 -1
@@ -77,7 +77,14 @@ the I/O engine core to prevent writes due to unknown user space bug(s). .TP .BI \-\-eta \fR=\fPwhen Specifies when real\-time ETA estimate should be printed. \fIwhen\fR may -be `always', `never' or `auto'. +be `always', `never' or `auto'. `auto' is the default, it prints ETA when +requested if the output is a TTY. `always' disregards the output type, and +prints ETA when requested. `never' never prints ETA. +.TP +.BI \-\-eta\-interval \fR=\fPtime +By default, fio requests client ETA status roughly every second. With this +option, the interval is configurable. Fio imposes a minimum allowed time to +avoid flooding the console, less than 250 msec is not supported. .TP .BI \-\-eta\-newline \fR=\fPtime Force a new line for every \fItime\fR period passed. When the unit is omitted,
fio.h +3 -0
@@ -505,6 +505,7 @@ extern uintptr_t page_mask, page_size;extern int read_only;extern int eta_print;extern int eta_new_line; +extern unsigned int eta_interval_msec;extern unsigned long done_secs;extern int fio_gtod_offload;extern int fio_gtod_cpu;
@@ -525,6 +526,8 @@ extern char *aux_path;extern struct thread_data *threads; +extern bool eta_time_within_slack (unsigned int time); +static inline void fio_ro_check (const struct thread_data *td,struct io_u *io_u) {assert (!(io_u->ddir ==DDIR_WRITE && !td_write (td)));
init.c +29 -0
@@ -51,6 +51,7 @@ static int nr_job_sections;int exitall_on_terminate =0 ;int output_format =FIO_OUTPUT_NORMAL ;int eta_print =FIO_ETA_AUTO ; +unsigned int eta_interval_msec =1000 ;int eta_new_line =0 ;FILE *f_out =NULL ;FILE *f_err =NULL ;
@@ -154,6 +155,11 @@ static struct option l_opts[FIO_NR_OPTIONS] = { .val = 'e' | FIO_CLIENT_FLAG, }, { + .name = (char *) "eta-interval", + .has_arg = required_argument, + .val = 'O' | FIO_CLIENT_FLAG, + }, + { .name = (char *) "eta-newline", .has_arg = required_argument, .val = 'E' | FIO_CLIENT_FLAG,
@@ -2504,8 +2510,31 @@ int parse_cmd_line(int argc, char *argv[], int client_type)log_err ("fio: failed parsing eta time %s\n" , optarg); exit_val =1 ; do_exit++; +break ; } eta_new_line = t /1000 ; +if (!eta_new_line) { +log_err ("fio: eta new line time too short\n" ); + exit_val =1 ; + do_exit++; + } +break ; + } +case 'O' : { +long long t =0 ; + +if (check_str_time (optarg, &t,1 )) { +log_err ("fio: failed parsing eta interval %s\n" , optarg); + exit_val =1 ; + do_exit++; +break ; + } + eta_interval_msec = t /1000 ; +if (eta_interval_msec <DISK_UTIL_MSEC ) { +log_err ("fio: eta interval time too short (%umsec min)\n" ,DISK_UTIL_MSEC ); + exit_val =1 ; + do_exit++; + }break ; }case 'd' :
os/windows/posix.c +3 -1
@@ -228,12 +228,14 @@ void Time_tToSystemTime(time_t dosTime, SYSTEMTIME *systemTime) {FILETIME utcFT;LONGLONG jan1970; +SYSTEMTIME tempSystemTime; jan1970 =Int32x32To64 (dosTime,10000000 ) +116444736000000000 ; utcFT.dwLowDateTime = (DWORD )jan1970; utcFT.dwHighDateTime = jan1970 >>32 ; -FileTimeToSystemTime ((FILETIME *)&utcFT, systemTime); +FileTimeToSystemTime ((FILETIME *)&utcFT, &tempSystemTime); +SystemTimeToTzSpecificLocalTime (NULL , &tempSystemTime, systemTime); }char *ctime_r (const time_t *t,char *buf)
server.c +32 -36
120 lines not on this page · raw message