From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: David Jeffery <djeffery@redhat.com>,
Bart Van Assche <bvanassche@acm.org>,
virtualization@lists.linux-foundation.org,
linux-block@vger.kernel.org,
Stefan Hajnoczi <stefanha@redhat.com>,
Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH V3 1/1] blk-mq: avoid double ->queue_rq() because of early timeout
Date: Mon, 31 Oct 2022 08:34:16 +0800 [thread overview]
Message-ID: <Y18YCBE/oCvM1+IA@T590> (raw)
In-Reply-To: <20221026051957.358818-1-ming.lei@redhat.com>
On Wed, Oct 26, 2022 at 01:19:57PM +0800, Ming Lei wrote:
> From: David Jeffery <djeffery@redhat.com>
>
> David Jeffery found one double ->queue_rq() issue, so far it can
> be triggered in VM use case because of long vmexit latency or preempt
> latency of vCPU pthread or long page fault in vCPU pthread, then block
> IO req could be timed out before queuing the request to hardware but after
> calling blk_mq_start_request() during ->queue_rq(), then timeout handler
> may handle it by requeue, then double ->queue_rq() is caused, and kernel
> panic.
>
> So far, it is driver's responsibility to cover the race between timeout
> and completion, so it seems supposed to be solved in driver in theory,
> given driver has enough knowledge.
>
> But it is really one common problem, lots of driver could have similar
> issue, and could be hard to fix all affected drivers, even it isn't easy
> for driver to handle the race. So David suggests this patch by draining
> in-progress ->queue_rq() for solving this issue.
>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Keith Busch <kbusch@kernel.org>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Bart Van Assche <bvanassche@acm.org>
> Signed-off-by: David Jeffery <djeffery@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> V3:
> - add callback for handle expired only, suggested by Keith Busch
Hi Jens,
Any chance to merge this fix? Either 6.1 or 6.2 is fine for me.
Thanks,
Ming
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-10-31 0:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 5:19 [PATCH V3 1/1] blk-mq: avoid double ->queue_rq() because of early timeout Ming Lei
2022-10-28 21:38 ` Bart Van Assche
2022-10-31 0:34 ` Ming Lei [this message]
2022-10-31 13:25 ` Jens Axboe
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=Y18YCBE/oCvM1+IA@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=djeffery@redhat.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.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).