From 132b1ee42e63a5ca369d94d33d2a7337741d7458 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 9 Oct 2017 10:11:19 -0600 Subject: [PATCH] engines/filecreate: set FIO_NOSTATS flag Before this change, we bundle the fake IO latencies with the file open latencies. That's not intended. Add a flag for IO engines to tell the core to ignore any IO latencies. Signed-off-by: Jens Axboe --- engines/filecreate.c | 3 ++- io_u.c | 2 +- ioengines.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/filecreate.c b/engines/filecreate.c index 171dcc95..01f7d68f 100644 --- a/engines/filecreate.c +++ b/engines/filecreate.c @@ -76,7 +76,8 @@ static struct ioengine_ops ioengine = { .get_file_size = get_file_size, .open_file = open_file, .close_file = generic_close_file, - .flags = FIO_DISKLESSIO | FIO_SYNCIO | FIO_FAKEIO, + .flags = FIO_DISKLESSIO | FIO_SYNCIO | FIO_FAKEIO | + FIO_NOSTATS, }; static void fio_init fio_filecreate_register(void) diff --git a/io_u.c b/io_u.c index 58c23202..fb4180a3 100644 --- a/io_u.c +++ b/io_u.c @@ -1779,7 +1779,7 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, if (td->parent) td = td->parent; - if (!td->o.stats) + if (!td->o.stats || td_ioengine_flagged(td, FIO_NOSTATS)) return; if (no_reduce) diff --git a/ioengines.h b/ioengines.h index 177cbc05..e744f3f8 100644 --- a/ioengines.h +++ b/ioengines.h @@ -59,6 +59,7 @@ enum fio_ioengine_flags { FIO_MEMALIGN = 1 << 9, /* engine wants aligned memory */ FIO_BIT_BASED = 1 << 10, /* engine uses a bit base (e.g. uses Kbit as opposed to KB) */ FIO_FAKEIO = 1 << 11, /* engine pretends to do IO */ + FIO_NOSTATS = 1 << 12, /* don't do IO stats */ }; /* -- 2.25.1