From a0a930efb970a688c0e21e396755210e1bdd05a9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 Feb 2007 19:47:13 +0100 Subject: [PATCH 1/1] syslet engine: submission latency numbers Signed-off-by: Jens Axboe --- engines/syslet-rw.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/engines/syslet-rw.c b/engines/syslet-rw.c index 4b1b2636..8ab217f4 100644 --- a/engines/syslet-rw.c +++ b/engines/syslet-rw.c @@ -187,6 +187,23 @@ static unsigned long thread_stack_alloc() return (unsigned long) malloc(THREAD_STACK_SIZE) + THREAD_STACK_SIZE; } +static void fio_syslet_queued(struct thread_data *td, struct syslet_data *sd) +{ + struct syslet_uatom *atom; + struct timeval now; + + fio_gettime(&now, NULL); + + atom = sd->head; + while (atom) { + struct io_u *io_u = atom->private; + + memcpy(&io_u->issue_time, &now, sizeof(now)); + io_u_queued(td, io_u); + atom = atom->next; + } +} + static int fio_syslet_commit(struct thread_data *td) { struct syslet_data *sd = td->io_ops->data; @@ -200,6 +217,8 @@ static int fio_syslet_commit(struct thread_data *td) if (!sd->ahu.new_thread_stack) sd->ahu.new_thread_stack = thread_stack_alloc(); + fio_syslet_queued(td, sd); + /* * On sync completion, the atom is returned. So on NULL return * it's queued asynchronously. -- 2.25.1