* [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed
@ 2017-05-01 23:28 Ming Lei
2017-05-02 17:33 ` Jens Axboe
2017-05-02 17:34 ` Bart Van Assche
0 siblings, 2 replies; 3+ messages in thread
From: Ming Lei @ 2017-05-01 23:28 UTC (permalink / raw)
To: Jens Axboe, linux-block, Christoph Hellwig; +Cc: Ming Lei, Bart Van Assche
After queue is freezed, no request in this queue can be in use
at all, so there can't be any .queue_rq() is running on this queue.
It isn't necessary to call blk_mq_quiesce_queue() any more, so
remove it in both elevator_switch_mq() and blk_mq_update_nr_requests().
Cc: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 2 --
block/elevator.c | 3 ---
2 files changed, 5 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index bf90684a007a..8f72f16b498a 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2617,7 +2617,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
return -EINVAL;
blk_mq_freeze_queue(q);
- blk_mq_quiesce_queue(q);
ret = 0;
queue_for_each_hw_ctx(q, hctx, i) {
@@ -2643,7 +2642,6 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
q->nr_requests = nr;
blk_mq_unfreeze_queue(q);
- blk_mq_start_stopped_hw_queues(q, true);
return ret;
}
diff --git a/block/elevator.c b/block/elevator.c
index bf11e70f008b..c7a4ee682033 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -950,7 +950,6 @@ static int elevator_switch_mq(struct request_queue *q,
int ret;
blk_mq_freeze_queue(q);
- blk_mq_quiesce_queue(q);
if (q->elevator) {
if (q->elevator->registered)
@@ -978,9 +977,7 @@ static int elevator_switch_mq(struct request_queue *q,
out:
blk_mq_unfreeze_queue(q);
- blk_mq_start_stopped_hw_queues(q, true);
return ret;
-
}
/*
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed
2017-05-01 23:28 [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed Ming Lei
@ 2017-05-02 17:33 ` Jens Axboe
2017-05-02 17:34 ` Bart Van Assche
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2017-05-02 17:33 UTC (permalink / raw)
To: Ming Lei, linux-block, Christoph Hellwig; +Cc: Bart Van Assche
On 05/01/2017 05:28 PM, Ming Lei wrote:
> After queue is freezed, no request in this queue can be in use
> at all, so there can't be any .queue_rq() is running on this queue.
> It isn't necessary to call blk_mq_quiesce_queue() any more, so
> remove it in both elevator_switch_mq() and blk_mq_update_nr_requests().
Added, thanks Ming.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed
2017-05-01 23:28 [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed Ming Lei
2017-05-02 17:33 ` Jens Axboe
@ 2017-05-02 17:34 ` Bart Van Assche
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2017-05-02 17:34 UTC (permalink / raw)
To: hch, linux-block, axboe, ming.lei
On Tue, 2017-05-02 at 07:28 +0800, Ming Lei wrote:
> After queue is freezed, no request in this queue can be in use
> at all, so there can't be any .queue_rq() is running on this queue.
> It isn't necessary to call blk_mq_quiesce_queue() any more, so
> remove it in both elevator_switch_mq() and blk_mq_update_nr_requests().
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-02 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 23:28 [PATCH] block: don't call blk_mq_quiesce_queue() after queue is freezed Ming Lei
2017-05-02 17:33 ` Jens Axboe
2017-05-02 17:34 ` Bart Van Assche
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.