From: Jens Axboe Date: Wed, 10 Jan 2007 10:33:14 +0000 (+0100) Subject: [PATCH] Reversed order of thinktime_blocks modulo operation X-Git-Tag: fio-1.12~176 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=25309a33aa949413e8c69fd879b5964758de8c38;hp=6da1fa7f0a8d7e588dc0ea40a5e175edded9a8ac [PATCH] Reversed order of thinktime_blocks modulo operation We wish to find the remainder of block count vs thinktime_blocks, not the other way around. This makes thinktime_blocks work correctly. Signed-off-by: Jens Axboe --- diff --git a/fio.c b/fio.c index 28f6376d..dd526264 100644 --- a/fio.c +++ b/fio.c @@ -452,7 +452,7 @@ static void do_io(struct thread_data *td) unsigned long long b; b = td->io_blocks[0] + td->io_blocks[1]; - if (!(td->thinktime_blocks % b)) + if (!(b % td->thinktime_blocks)) usec_sleep(td, td->thinktime); } }