* [PATCH] blk-mq: don't issue request directly in case that current is to be blocked
@ 2021-10-26 8:22 Ming Lei
2021-10-26 14:38 ` Jens Axboe
2021-10-26 14:38 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2021-10-26 8:22 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Ming Lei
When flushing plug list in case that current will be blocked, we can't
issue request directly because ->queue_rq() may sleep, otherwise scheduler
may complain.
Fixes: dc5fc361d891 ("block: attempt direct issue of plug list")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c19dfa8ea65e..9840b15f505b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2223,7 +2223,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
return;
plug->rq_count = 0;
- if (!plug->multiple_queues && !plug->has_elevator) {
+ if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) {
blk_mq_plug_issue_direct(plug, from_schedule);
if (rq_list_empty(plug->mq_list))
return;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-mq: don't issue request directly in case that current is to be blocked
2021-10-26 8:22 [PATCH] blk-mq: don't issue request directly in case that current is to be blocked Ming Lei
@ 2021-10-26 14:38 ` Jens Axboe
2021-10-26 14:38 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-10-26 14:38 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-block
On Tue, 26 Oct 2021 16:22:57 +0800, Ming Lei wrote:
> When flushing plug list in case that current will be blocked, we can't
> issue request directly because ->queue_rq() may sleep, otherwise scheduler
> may complain.
>
>
Applied, thanks!
[1/1] blk-mq: don't issue request directly in case that current is to be blocked
commit: ff1552232b3612edff43a95746a4e78e231ef3d4
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-mq: don't issue request directly in case that current is to be blocked
2021-10-26 8:22 [PATCH] blk-mq: don't issue request directly in case that current is to be blocked Ming Lei
2021-10-26 14:38 ` Jens Axboe
@ 2021-10-26 14:38 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-10-26 14:38 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-block
On 10/26/21 2:22 AM, Ming Lei wrote:
> When flushing plug list in case that current will be blocked, we can't
> issue request directly because ->queue_rq() may sleep, otherwise scheduler
> may complain.
Oops indeed, thanks Ming.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-26 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 8:22 [PATCH] blk-mq: don't issue request directly in case that current is to be blocked Ming Lei
2021-10-26 14:38 ` Jens Axboe
2021-10-26 14:38 ` Jens Axboe
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.