From: Ming Lei Date: Sun, 8 Apr 2018 09:48:08 +0000 (+0800) Subject: blk-mq: don't keep offline CPUs mapped to hctx 0 X-Git-Tag: v4.19~1200^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bffa9909a6b48d8ca3398dec601bc9162a4020c4;p=platform%2Fkernel%2Flinux-rpi.git blk-mq: don't keep offline CPUs mapped to hctx 0 From commit 4b855ad37194 ("blk-mq: Create hctx for each present CPU), blk-mq doesn't remap queue after CPU topo is changed, that said when some of these offline CPUs become online, they are still mapped to hctx 0, then hctx 0 may become the bottleneck of IO dispatch and completion. This patch sets up the mapping from the beginning, and aligns to queue mapping for PCI device (blk_mq_pci_map_queues()). Cc: Stefan Haberland Cc: Keith Busch Cc: stable@vger.kernel.org Fixes: 4b855ad37194 ("blk-mq: Create hctx for each present CPU) Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c index 9f8cffc..3eb169f 100644 --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c @@ -16,11 +16,6 @@ static int cpu_to_queue_index(unsigned int nr_queues, const int cpu) { - /* - * Non present CPU will be mapped to queue index 0. - */ - if (!cpu_present(cpu)) - return 0; return cpu % nr_queues; }