From: Jens Axboe Date: Mon, 9 Oct 2017 16:11:19 +0000 (-0600) Subject: engines/filecreate: set FIO_NOSTATS flag X-Git-Tag: fio-3.2~57 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=132b1ee42e63a5ca369d94d33d2a7337741d7458;p=fio.git 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 --- 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 */ }; /*