]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
blk-mq: map queues to all present CPUs
authorChristoph Hellwig <hch@lst.de>
Tue, 18 Jul 2017 15:04:40 +0000 (17:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Jul 2017 16:01:31 +0000 (10:01 -0600)
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>
block/blk-mq-cpumap.c

index 4891f042a22ff7c7a27abb0f71a6c65fa32ffd51..9f8cffc8a701ec24c87729b9ef4a1048cc7d205f 100644 (file)
@@ -17,9 +17,9 @@
 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 cpu % nr_queues;
 }