linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BLK_QC_T_NONE and polled I/O
@ 2020-04-06 18:30 Bijan Mottahedeh
  0 siblings, 0 replies; only message in thread
From: Bijan Mottahedeh @ 2020-04-06 18:30 UTC (permalink / raw)
  To: linux-block

I have a question BLK_QC_T_NONE interaction with polled I/O.

Given that blk_poll() returns immediately in case of 
blk_qc_t_valid(cookie), the following cases return BLK_QC_T_NONE which 
seem like they would be problematic with polling:

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

In this case the request is deferred but should get a cookie 
eventually.  How would the submitter poll for this request?

__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, 
__blk_mq_requeue_request() will release the original cookie and this 
request will eventually be resubmitted, so how would the submitter 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);


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

Thanks.

--bijan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-06 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 18:30 BLK_QC_T_NONE and polled I/O Bijan Mottahedeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).