mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
blk-mq: don't keep offline CPUs mapped to hctx 0
From commit4b855ad371("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 <[email protected]> Cc: Keith Busch <[email protected]> Cc: [email protected] Fixes:4b855ad371("blk-mq: Create hctx for each present CPU) Tested-by: Christian Borntraeger <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
a1c735fb79
commit
bffa9909a6
1 file changed
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user