Skip to content

Commit bffa990

Browse files
Ming Leiaxboe
authored andcommitted
blk-mq: don't keep offline CPUs mapped to hctx 0
From commit 4b855ad ("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: 4b855ad ("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>
1 parent a1c735f commit bffa990

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

block/blk-mq-cpumap.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
1818
{
19-
/*
20-
* Non present CPU will be mapped to queue index 0.
21-
*/
22-
if (!cpu_present(cpu))
23-
return 0;
2419
return cpu % nr_queues;
2520
}
2621

0 commit comments

Comments
 (0)