[PATCH v7] NVMe: conversion to blk-mq

Jens Axboe axboe at fb.com
Fri Jun 13 07:07:29 PDT 2014


On 06/12/2014 06:06 PM, Keith Busch wrote:
> When cancelling IOs, we have to check if the hwctx has a valid tags
> for some reason. I have 32 cores in my system and as many queues, but

It's because unused queues are torn down, to save memory.

> blk-mq is only using half of those queues and freed the "tags" for the
> rest after they'd been initialized without telling the driver. Why is
> blk-mq not making utilizing all my queues?

You have 31 + 1 queues, so only 31 mappable queues. blk-mq symmetrically
distributes these, so you should have a core + thread sibling on 16
queues. And yes, that leaves 15 idle hardware queues for this specific
case. I like the symmetry, it makes it more predictable if things are
spread out evenly.

But it is a policy decision that could be changed. The logic is in the
50 lines of code in block/blk-mq-cpumap.c:blk_mq_update_queue_map().

Thanks for the abort and completion fixes, looks a lot better now. It
might be cleaner to have blk_mq_tag_busy_iter() just work for
!hctx->tags, since this is actually the 2nd time I've run into this now.





More information about the Linux-nvme mailing list