Browse Source

blk-mq: map queues to all present CPUs

We already do this for PCI mappings, and the higher level code now
expects that CPU on/offlining doesn't have an affect on the queue
mappings.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Christoph Hellwig 8 years ago
parent
commit
76451d79bd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      block/blk-mq-cpumap.c

+ 2 - 2
block/blk-mq-cpumap.c

@@ -17,9 +17,9 @@
 static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
 static int cpu_to_queue_index(unsigned int nr_queues, const int cpu)
 {
 {
 	/*
 	/*
-	 * Non online CPU will be mapped to queue index 0.
+	 * Non present CPU will be mapped to queue index 0.
 	 */
 	 */
-	if (!cpu_online(cpu))
+	if (!cpu_present(cpu))
 		return 0;
 		return 0;
 	return cpu % nr_queues;
 	return cpu % nr_queues;
 }
 }