From: Jens Axboe Date: Thu, 25 Oct 2007 16:44:45 +0000 (+0200) Subject: More cpu engine fixes X-Git-Tag: fio-1.17.2~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b4c5e1acb5a7964f858e2b41c1ae07b1afc0f4ea;hp=5a32012f174baf33978b041cffa36453f2d92947 More cpu engine fixes Signed-off-by: Jens Axboe --- diff --git a/fio.c b/fio.c index 0ec4f5a0..6f9a378b 100644 --- a/fio.c +++ b/fio.c @@ -657,10 +657,12 @@ static int init_io_u(struct thread_data *td) memset(io_u, 0, sizeof(*io_u)); INIT_LIST_HEAD(&io_u->list); - io_u->buf = p + max_bs * i; + if (!(td->io_ops->flags & FIO_NOIO)) { + io_u->buf = p + max_bs * i; - if (td_write(td)) - fill_io_buf(td, io_u, max_bs); + if (td_write(td)) + fill_io_buf(td, io_u, max_bs); + } io_u->index = i; io_u->flags = IO_U_F_FREE; diff --git a/io_u.c b/io_u.c index 4750ac60..cab09800 100644 --- a/io_u.c +++ b/io_u.c @@ -313,6 +313,9 @@ void requeue_io_u(struct thread_data *td, struct io_u **io_u) static int fill_io_u(struct thread_data *td, struct io_u *io_u) { + if (td->io_ops->flags & FIO_NOIO) + goto out; + /* * see if it's time to sync */ diff --git a/memory.c b/memory.c index c147229e..5678350f 100644 --- a/memory.c +++ b/memory.c @@ -145,6 +145,9 @@ int allocate_io_mem(struct thread_data *td) { int ret = 0; + if (td->io_ops->flags & FIO_NOIO) + return 0; + if (td->o.mem_type == MEM_MALLOC) ret = alloc_mem_malloc(td); else if (td->o.mem_type == MEM_SHM || td->o.mem_type == MEM_SHMHUGE) diff --git a/stat.c b/stat.c index e858d59d..604c235b 100644 --- a/stat.c +++ b/stat.c @@ -293,7 +293,8 @@ static void show_thread_status(struct thread_stat *ts, double io_u_lat_u[FIO_IO_U_LAT_U_NR]; double io_u_lat_m[FIO_IO_U_LAT_M_NR]; - if (!(ts->io_bytes[0] + ts->io_bytes[1])) + if (!(ts->io_bytes[0] + ts->io_bytes[1]) && + !(ts->total_io_u[0] + ts->total_io_u[1])) return; if (!ts->error)