linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: "André Almeida" <andrealmeid@collabora.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	axboe@kernel.dk, kernel@collabora.com
Subject: Re: [PATCH v2 1/1] blk-mq: fill header with kernel-doc
Date: Tue, 8 Oct 2019 13:01:38 -0700	[thread overview]
Message-ID: <86de2c88-5812-4a87-b5d8-1b7b1808d013@acm.org> (raw)
In-Reply-To: <85zhibyt14.fsf@collabora.com>

On 10/8/19 11:46 AM, Gabriel Krisman Bertazi wrote:
> Hmm, sorry, but I'm confused.  I'm sure I'm missing something simple,
> since I haven't touched this in a while, so maybe you can quickly point
> me in the right direction?
> 
> I see blk_mq_requeue_request() being used by device drivers to retry
> requests that failed, but if I read the code correctly, the flushed
> queue seems to be moved to hctx->dispatch when the device
> driver returned BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE to
> blk_mq_dispatch_rq_list(). I thought BLK_STS_RESOURCE was returned by
> the driver on .queue_rq() to signal there was no more resources on the
> hardware to service further requests.

Hi Gabriel,

The simplified version of how requests are requeued as follows:
* A block driver calls blk_mq_requeue_request().
* blk_mq_requeue_request() calls blk_mq_add_to_requeue_list()
* blk_mq_add_to_requeue_list() executes the following code:
     list_add_tail(&rq->queuelist, &q->requeue_list)
* A block driver or the block layer core calls
   blk_mq_kick_requeue_list() or blk_mq_delay_kick_requeue_list(). Both
   functions trigger a call of blk_mq_requeue_work().
* blk_mq_requeue_work() processes q->requeue_list.

Bart.



  reply	other threads:[~2019-10-08 20:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08  0:14 [PATCH v2 1/1] blk-mq: fill header with kernel-doc André Almeida
2019-10-08 16:35 ` Gabriel Krisman Bertazi
2019-10-08 17:30   ` Bart Van Assche
2019-10-08 18:46     ` Gabriel Krisman Bertazi
2019-10-08 20:01       ` Bart Van Assche [this message]
2019-10-10 20:38         ` André Almeida
2019-10-11 17:00           ` Bart Van Assche
2019-10-08 18:12 ` Bart Van Assche
2019-10-10 20:41   ` André Almeida

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=86de2c88-5812-4a87-b5d8-1b7b1808d013@acm.org \
    --to=bvanassche@acm.org \
    --cc=andrealmeid@collabora.com \
    --cc=axboe@kernel.dk \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@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).