linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn
@ 2018-06-04  9:03 Jianchao Wang
  2018-06-04 10:43 ` Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jianchao Wang @ 2018-06-04  9:03 UTC (permalink / raw)
  To: axboe, ming.lei; +Cc: linux-block, linux-kernel

if hctx is stopped, don't run the queue in blk_mq_run_work_fn.

Fixes: 15fe8a9 (blk-mq: remove blk_mq_delay_queue())
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.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 9ce9cac..d0ee928 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1578,7 +1578,7 @@ static void blk_mq_run_work_fn(struct work_struct *work)
 	 * If we are stopped, don't run the queue.
 	 */
 	if (test_bit(BLK_MQ_S_STOPPED, &hctx->state))
-		clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
+		return;
 
 	__blk_mq_run_hw_queue(hctx);
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn
  2018-06-04  9:03 [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn Jianchao Wang
@ 2018-06-04 10:43 ` Ming Lei
  2018-06-04 11:36 ` Bart Van Assche
  2018-06-04 16:21 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Ming Lei @ 2018-06-04 10:43 UTC (permalink / raw)
  To: Jianchao Wang; +Cc: axboe, linux-block, linux-kernel

On Mon, Jun 04, 2018 at 05:03:55PM +0800, Jianchao Wang wrote:
> if hctx is stopped, don't run the queue in blk_mq_run_work_fn.
> 
> Fixes: 15fe8a9 (blk-mq: remove blk_mq_delay_queue())
> Cc: Ming Lei <ming.lei@redhat.com>
> Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.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 9ce9cac..d0ee928 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1578,7 +1578,7 @@ static void blk_mq_run_work_fn(struct work_struct *work)
>  	 * If we are stopped, don't run the queue.
>  	 */
>  	if (test_bit(BLK_MQ_S_STOPPED, &hctx->state))
> -		clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
> +		return;
>  
>  	__blk_mq_run_hw_queue(hctx);
>  }
> -- 
> 2.7.4
> 

Reviewed-by: Ming Lei <ming.lei@redhat.com>

Thanks,
Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn
  2018-06-04  9:03 [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn Jianchao Wang
  2018-06-04 10:43 ` Ming Lei
@ 2018-06-04 11:36 ` Bart Van Assche
  2018-06-04 16:21 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2018-06-04 11:36 UTC (permalink / raw)
  To: ming.lei@redhat.com, jianchao.w.wang@oracle.com, axboe@kernel.dk
  Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org

T24gTW9uLCAyMDE4LTA2LTA0IGF0IDE3OjAzICswODAwLCBKaWFuY2hhbyBXYW5nIHdyb3RlOg0K
PiBpZiBoY3R4IGlzIHN0b3BwZWQsIGRvbid0IHJ1biB0aGUgcXVldWUgaW4gYmxrX21xX3J1bl93
b3JrX2ZuLg0KDQpSZXZpZXdlZC1ieTogQmFydCBWYW4gQXNzY2hlIDxiYXJ0LnZhbmFzc2NoZUB3
ZGMuY29tPg0KDQoNCg0K

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn
  2018-06-04  9:03 [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn Jianchao Wang
  2018-06-04 10:43 ` Ming Lei
  2018-06-04 11:36 ` Bart Van Assche
@ 2018-06-04 16:21 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-06-04 16:21 UTC (permalink / raw)
  To: Jianchao Wang, ming.lei; +Cc: linux-block, linux-kernel

On 6/4/18 3:03 AM, Jianchao Wang wrote:
> if hctx is stopped, don't run the queue in blk_mq_run_work_fn.

I was puzzled, so had to look up those changes. That's definitely
a regression caused by 15fe8a9, as you highlighted. Looks good to
me, I'll apply it.

BTW, this should have been explained in the commit message. I'll
change it a bit.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-04 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04  9:03 [PATCH] blk-mq: return when BLK_MQ_S_STOPPED in blk_mq_run_work_fn Jianchao Wang
2018-06-04 10:43 ` Ming Lei
2018-06-04 11:36 ` Bart Van Assche
2018-06-04 16:21 ` Jens Axboe

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).