From: Robert Elliott <elliott@hp.com>
To: elliott@hp.com, axboe@kernek.dk, fio@vger.kernel.org,
scameron@beardog.cce.hp.com
Subject: [PATCH] fio: fix hangs due to iodepth_low
Date: Wed, 03 Sep 2014 19:23:02 -0500 [thread overview]
Message-ID: <20140904002246.24621.83732.stgit@beardog.cce.hp.com> (raw)
With some combinations of iodepth, iodepth_batch, iodepth_batch_complete,
and io_depth_low, do_io hangs after reaping the first set of completions
since io_u_queued_complete is called requesting more completions than
td->cur_depth.
Example printing min_evts and td->cur_depth in the do/while loop:
waiting on min=96 cd=627
waiting on min=96 cd=531
waiting on min=96 cd=435
waiting on min=96 cd=339
waiting on min=96 cd=243
waiting on min=96 cd=147
waiting on min=96 cd=51
Jobs: 12 (f=12): [r(12)] [43.8% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 00m:09s]
...
Jobs: 12 (f=12): [r(12)] [0.0% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 2863d:18h:28m:38s]
<fio never exits>
Fix this by adjusting min_evts to the current_depth if that is smaller.
Tested with a jobfile including:
iodepth=1011
iodepth_batch=96
iodepth_batch_complete=96
iodepth_low=1
runtime=15
time_based
Made the same change to do_verify, but not tested there.
Signed-off-by: Robert Elliott <elliott@hp.com>
---
backend.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/backend.c b/backend.c
index 7cb0a39..ce97f6d 100644
--- a/backend.c
+++ b/backend.c
@@ -606,6 +606,8 @@ reap:
* and do the verification on them through
* the callback handler
*/
+ if (min_events < td->cur_depth)
+ min_events = td->cur_depth;
if (io_u_queued_complete(td, min_events, bytes_done) < 0) {
ret = -1;
break;
@@ -873,6 +875,8 @@ reap:
fio_gettime(&comp_time, NULL);
do {
+ if (min_evts < td->cur_depth)
+ min_evts = td->cur_depth;
ret = io_u_queued_complete(td, min_evts, bytes_done);
if (ret < 0)
break;
next reply other threads:[~2014-09-04 0:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 0:23 Robert Elliott [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-04 0:23 [PATCH] fio: fix hangs due to iodepth_low Robert Elliott
2014-09-04 1:18 ` Stephen Cameron
2014-09-04 1:34 ` Jens Axboe
2014-09-04 1:36 ` Jens Axboe
2014-09-04 14:27 ` Elliott, Robert (Server Storage)
2014-09-04 14:38 ` Jens Axboe
2014-09-04 19:42 ` Elliott, Robert (Server Storage)
2014-09-04 19:55 ` Jens Axboe
2014-09-04 2:08 ` Elliott, Robert (Server Storage)
2014-09-04 2:11 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140904002246.24621.83732.stgit@beardog.cce.hp.com \
--to=elliott@hp.com \
--cc=axboe@kernek.dk \
--cc=fio@vger.kernel.org \
--cc=scameron@beardog.cce.hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox