Re: [PATCH 4/9] blk-mq: only run hw queues for blk-mq
On Fri, Sep 01, 2017 at 08:33:40PM +0800, Ming Lei wrote: > Given it is the only case that blk_mq_run_hw_queues() is run on > !q->mq_ops now, I suggest to check q->mq_ops outside, otherwise > it can be a bit overkill. Fair enough, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Re: [PATCH 4/9] blk-mq: only run hw queues for blk-mq
On Fri, Sep 01, 2017 at 10:16:34AM +0200, Johannes Thumshirn wrote: > Hi Ming, > > On Fri, Sep 01, 2017 at 01:27:23AM +0800, Ming Lei wrote: > > - blk_mq_run_hw_queues(q, false); > > + if (q->mq_ops) > > + blk_mq_run_hw_queues(q, false); > > What speaks against putting the if (q->mq_ops) directly into > blk_mq_run_hw_queues() so we can't accidently call it from the sq path? > > Just an idea, no hard preferences here. Given it is the only case that blk_mq_run_hw_queues() is run on !q->mq_ops now, I suggest to check q->mq_ops outside, otherwise it can be a bit overkill. -- Ming
Re: [PATCH 4/9] blk-mq: only run hw queues for blk-mq
Hi Ming, On Fri, Sep 01, 2017 at 01:27:23AM +0800, Ming Lei wrote: > - blk_mq_run_hw_queues(q, false); > + if (q->mq_ops) > + blk_mq_run_hw_queues(q, false); What speaks against putting the if (q->mq_ops) directly into blk_mq_run_hw_queues() so we can't accidently call it from the sq path? Just an idea, no hard preferences here. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
[PATCH 4/9] blk-mq: only run hw queues for blk-mq
This patch just makes it explicitely. Signed-off-by: Ming Lei --- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 8cf1f7cbef2b..4c532d8612e1 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -125,7 +125,8 @@ void blk_freeze_queue_start(struct request_queue *q) freeze_depth = atomic_inc_return(&q->mq_freeze_depth); if (freeze_depth == 1) { percpu_ref_kill(&q->q_usage_counter); - blk_mq_run_hw_queues(q, false); + if (q->mq_ops) + blk_mq_run_hw_queues(q, false); } } EXPORT_SYMBOL_GPL(blk_freeze_queue_start); -- 2.9.5