lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/1] blk-mq: fill header with kernel-doc
From
Date
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.


\
 
 \ /
  Last update: 2019-10-08 22:02    [W:0.231 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site