[PATCH 1/2] blk-mq: not deactivate hctx if the device doesn't use managed irq

John Garry john.garry at huawei.com
Wed Jun 30 02:25:41 PDT 2021


On 30/06/2021 01:32, Ming Lei wrote:
>> Many block drivers don't use managed interrupts - to be proper, why not set
>> this everywhere (which doesn't use managed interrupts)? I know why, but it's
>> odd.
> It is just one small optimization in slow path for other drivers, not sure these
> drivers are interested in such change. It only serves as fix for callers of
> blk_mq_alloc_request_hctx().
> 
> Anyway, we can document the situation.
> 
>> As an alternative, if the default queue mapping was used (in
>> blk_mq_map_queues()), then that's the same thing as
>> BLK_MQ_F_NOT_USE_MANAGED_IRQ in reality, right? If so, could we
>> alternatively check for that somehow?
> This way can't work, for example of NVMe PCI, managed irq is used for
> the default/write queues, but poll queues uses blk_mq_map_queues().
> 
> Also it can't cover all cases, such as MVMe RDMA.
> 
> Using managed irq or not is thing of driver's choice, and not sure if it
> is good for block layer to provide such abstract. I'd suggest to fix the
> issue still by passing one flag, given we needn't it everywhere so far.

Sure, but I am just trying to suggest a more automatic way of passing 
this info. Like, for example, if we use blk_mq_pci_map_queues() on the 
qmap, then you prob want blk-mq managed interrupt support (for that 
qmap), i.e. CPU hotplug handlers.

Thanks,
John



More information about the Linux-nvme mailing list