From: Jens Axboe Date: Wed, 1 Aug 2012 07:50:27 +0000 (+0200) Subject: Merge branch 'master' into gfio X-Git-Tag: fio-2.1~57^2~67 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=80666bece308842c36132245e4cbbe9eb0bc506b Merge branch 'master' into gfio Conflicts: iolog.h stat.c Signed-off-by: Jens Axboe --- 80666bece308842c36132245e4cbbe9eb0bc506b diff --cc backend.c index 38efc230,9cc8dbc3..dcc6fba0 --- a/backend.c +++ b/backend.c @@@ -1597,13 -1586,21 +1598,20 @@@ static void run_threads(void } update_io_ticks(); - fio_unpin_memory(); } + void wait_for_disk_thread_exit(void) + { + fio_mutex_down(disk_thread_mutex); + } + static void *disk_thread_main(void *data) { + int ret = 0; + fio_mutex_up(startup_mutex); - while (threads) { + while (threads && !ret) { usleep(DISK_UTIL_MSEC * 1000); if (!threads) break; diff --cc iolog.h index 0d6b5062,1853846e..122a982e --- a/iolog.h +++ b/iolog.h @@@ -119,8 -107,7 +119,7 @@@ extern void add_bw_sample(struct thread extern void add_iops_sample(struct thread_data *, enum fio_ddir, struct timeval *); extern void init_disk_util(struct thread_data *); extern void update_rusage_stat(struct thread_data *); - extern void update_io_ticks(void); -extern void setup_log(struct io_log **, unsigned long); +extern void setup_log(struct io_log **, unsigned long, int); extern void finish_log(struct thread_data *, struct io_log *, const char *); extern void finish_log_named(struct thread_data *, struct io_log *, const char *, const char *); extern void __finish_log(struct io_log *, const char *); diff --cc stat.c index ee495ffd,0a047981..ef447b16 --- a/stat.c +++ b/stat.c @@@ -485,7 -521,11 +485,10 @@@ void show_thread_status(struct thread_s double usr_cpu, sys_cpu; unsigned long runtime; double io_u_dist[FIO_IO_U_MAP_NR]; - double io_u_lat_u[FIO_IO_U_LAT_U_NR]; - double io_u_lat_m[FIO_IO_U_LAT_M_NR]; + time_t time_p; + char time_buf[64]; + + if (!(ts->io_bytes[0] + ts->io_bytes[1]) && !(ts->total_io_u[0] + ts->total_io_u[1])) return;