Skip to content

Commit

Permalink
blk-mq: map queues to all present CPUs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Max Gurtovoy <[email protected]>
Reviewed-by: Max Gurtovoy <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jul 24, 2017
1 parent 765e40b commit 76451d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-mq-cpumap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 76451d7

Please sign in to comment.