From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Bart Van Assche <bvanassche@acm.org>
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, 08 Oct 2019 14:46:31 -0400 [thread overview]
Message-ID: <85zhibyt14.fsf@collabora.com> (raw)
In-Reply-To: <6aa48cd2-5f23-a4be-f777-d65bf755a976@acm.org> (Bart Van Assche's message of "Tue, 8 Oct 2019 10:30:58 -0700")
Bart Van Assche <bvanassche@acm.org> writes:
> On 10/8/19 9:35 AM, Gabriel Krisman Bertazi wrote:
>> André Almeida <andrealmeid@collabora.com> writes:
>>
>>> diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
>>> index e0fce93ac127..8b745f229789 100644
>>> --- a/include/linux/blk-mq.h
>>> +++ b/include/linux/blk-mq.h
>>> @@ -10,74 +10,153 @@ struct blk_mq_tags;
>>> struct blk_flush_queue;
>>> /**
>>> - * struct blk_mq_hw_ctx - State for a hardware queue facing the hardware block device
>>> + * struct blk_mq_hw_ctx - State for a hardware queue facing the hardware
>>> + * block device
>>> */
>>> struct blk_mq_hw_ctx {
>>> struct {
>>> + /** @lock: Lock for accessing dispatch queue */
>>> spinlock_t lock;
>>> + /**
>>> + * @dispatch: Queue of dispatched requests, waiting for
>>> + * workers to send them to the hardware.
>>> + */
>>
>> It's been a few years since I looked at the block layer, but isn't
>> this used to hold requests that were taken from the blk_mq_ctx, but
>> couldn't be dispatched because the queue was full?
>
> I don't think so. I think that you are looking for the requeue_list
> member of struct request_queue.
>
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.
--
Gabriel Krisman Bertazi
next prev parent reply other threads:[~2019-10-08 18:46 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 [this message]
2019-10-08 20:01 ` Bart Van Assche
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=85zhibyt14.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=andrealmeid@collabora.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.