diff options
author | Ming Lei <ming.lei@redhat.com> | 2018-04-08 05:48:08 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-04-10 10:38:46 -0400 |
commit | bffa9909a6b48d8ca3398dec601bc9162a4020c4 (patch) | |
tree | 3740c4356291dd9a361ff7647a7c4543779632d3 | |
parent | a1c735fb790745f94a359df45c11df4a69760389 (diff) |
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 <sth@linux.vnet.ibm.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: stable@vger.kernel.org
Fixes: 4b855ad37194 ("blk-mq: Create hctx for each present CPU)
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/blk-mq-cpumap.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c index 9f8cffc8a701..3eb169f15842 100644 --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c | |||
@@ -16,11 +16,6 @@ | |||
16 | 16 | ||
17 | static int cpu_to_queue_index(unsigned int nr_queues, const int cpu) | 17 | static int cpu_to_queue_index(unsigned int nr_queues, const int cpu) |
18 | { | 18 | { |
19 | /* | ||
20 | * Non present CPU will be mapped to queue index 0. | ||
21 | */ | ||
22 | if (!cpu_present(cpu)) | ||
23 | return 0; | ||
24 | return cpu % nr_queues; | 19 | return cpu % nr_queues; |
25 | } | 20 | } |
26 | 21 | ||