linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
To: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: BLK_QC_T_NONE and polled I/O
Date: Mon, 6 Apr 2020 11:30:23 -0700	[thread overview]
Message-ID: <44e755b7-df5c-add6-900e-25e3df63b2c6@oracle.com> (raw)

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

                 reply	other threads:[~2020-04-06 18:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44e755b7-df5c-add6-900e-25e3df63b2c6@oracle.com \
    --to=bijan.mottahedeh@oracle.com \
    --cc=linux-block@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).