public inbox for [email protected]
 help / color / mirror / Atom feed
* Polled I/O cannot find completions
@ 2020-03-27  2:57 Bijan Mottahedeh
  2020-03-27 15:36 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Bijan Mottahedeh @ 2020-03-27  2:57 UTC (permalink / raw)
  To: Jens Axboe; +Cc: io-uring

I'm seeing poll threads hang as I increase the number of threads in 
polled fio tests.  I think this is because of polling on BLK_QC_T_NONE 
cookie, which will never succeed.

A related problem however, is that the meaning of BLK_QC_T_NONE seems to 
be ambiguous.

Specifically, the following cases return BLK_QC_T_NONE which I think 
would be problematic for polled io:


generic_make_request()
...
         if (current->bio_list) {
                 bio_list_add(&current->bio_list[0], bio);
                 goto out;
         }

In this case the request is delayed but should get a cookie eventually.  
How does the caller know what the right action is in this case for a 
polled request?  Polling would never succeed.


__blk_mq_issue_directly()
...
         case BLK_STS_RESOURCE:
         case BLK_STS_DEV_RESOURCE:
                 blk_mq_update_dispatch_busy(hctx, true);
                 __blk_mq_requeue_request(rq);
                 break;

In this case, cookie is not updated and would keep its default 
BLK_QC_T_NONE value from blk_mq_make_request().  However, this request 
will eventually be reissued, so again, how would the caller poll for the 
completion of this request?

blk_mq_try_issue_directly()
...
         ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false, true);
         if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE)
                 blk_mq_request_bypass_insert(rq, false, true);

Am I missing something here?

Incidentally, I don't see BLK_QC_T_EAGAIN used anywhere, should it be?

Thanks.

--bijan





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-01  1:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-27  2:57 Polled I/O cannot find completions Bijan Mottahedeh
2020-03-27 15:36 ` Jens Axboe
2020-03-27 16:31   ` Bijan Mottahedeh
2020-03-27 16:35     ` Jens Axboe
2020-03-31 18:43       ` Bijan Mottahedeh
2020-04-01  1:01         ` Bijan Mottahedeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox