Skip to contentSkip to conversation

blk-mq: map queues to all present CPUs

PATCH In review Christoph Hellwig 3 participants 3 messages Jul 18, 2017 – Jul 24, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 block/blk-mq-cpumap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
block/blk-mq-cpumap.c +2 -2
index 4891f042a22f..9f8cffc8a701 100644
@@ -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;
 }
Signature · 1 line
2.11.0
Reviewed-by on v1 1/1
#1 lore raw

Looks good,

Signature · 6 lines
Johannes Thumshirn                                          Storage
[email protected]                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: Felix Imend�rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N�rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
maintainer
#2 lore raw
In reply to Christoph Hellwig
Quoted 3 lines · Christoph Hellwig

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.

Applied for 4.13, thanks.

Signature · 1 line
Jens Axboe