Re: [PATCH 4/9] blk-mq: only run hw queues for blk-mq

Ming Lei
2017-09-01T12:33:54Z

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