blk-mq: balance mapping between present CPUs and queues
authorMing Lei <ming.lei@redhat.com>
Thu, 25 Jul 2019 09:41:46 +0000 (17:41 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:43:12 +0000 (21:43 -0600)
commit556f36e90dbe7dded81f4fac084d2bc8a2458330
treed8e04c7dfcdf85432ca737c35250a23091c869a2
parentb7e9e1fb7a9227be34ad4a5e778022c3164494cf
blk-mq: balance mapping between present CPUs and queues

Spread queues among present CPUs first, then building mapping on other
non-present CPUs.

So we can minimize count of dead queues which are mapped by un-present
CPUs only. Then bad IO performance can be avoided by unbalanced mapping
between present CPUs and queues.

The similar policy has been applied on Managed IRQ affinity.

Cc: Yi Zhang <yi.zhang@redhat.com>
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-cpumap.c