More cpu engine fixes
authorJens Axboe <jens.axboe@oracle.com>
Thu, 25 Oct 2007 16:44:45 +0000 (18:44 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 25 Oct 2007 16:44:45 +0000 (18:44 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c
io_u.c
memory.c
stat.c

diff --git a/fio.c b/fio.c
index 0ec4f5a0e347f975078cb9628e5c81641ad592f4..6f9a378b3599084927f1cb940aa9b28d8ff7648d 100644 (file)
--- 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 4750ac600a4272142bc85ccf9333382fcb1a4d28..cab09800de5afea6e1e3d749f97ef33139faca6e 100644 (file)
--- 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
         */
index c147229e27c67d4135bfe9c64be82f8dbe8e2c46..5678350f79b2527e50f7f58bd0542fdab9e8e993 100644 (file)
--- 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 e858d59d34cc1fc5a3c26575481d39f92646d652..604c235b0c57a0551e28907cf3cf90f7420b5a19 100644 (file)
--- 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)