linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: map queues to all present CPUs
@ 2017-07-18 15:04 Christoph Hellwig
  2017-07-19  7:08 ` Johannes Thumshirn
  2017-07-24 16:01 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-07-18 15:04 UTC (permalink / raw)
  To: axboe; +Cc: maxg, linux-block

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>
---
 block/blk-mq-cpumap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 4891f042a22f..9f8cffc8a701 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -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;
 }
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-mq: map queues to all present CPUs
  2017-07-18 15:04 [PATCH] blk-mq: map queues to all present CPUs Christoph Hellwig
@ 2017-07-19  7:08 ` Johannes Thumshirn
  2017-07-24 16:01 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-07-19  7:08 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: axboe, maxg, linux-block

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-mq: map queues to all present CPUs
  2017-07-18 15:04 [PATCH] blk-mq: map queues to all present CPUs Christoph Hellwig
  2017-07-19  7:08 ` Johannes Thumshirn
@ 2017-07-24 16:01 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2017-07-24 16:01 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: maxg, linux-block

On 07/18/2017 09:04 AM, Christoph Hellwig wrote:
> 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.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-24 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 15:04 [PATCH] blk-mq: map queues to all present CPUs Christoph Hellwig
2017-07-19  7:08 ` Johannes Thumshirn
2017-07-24 16:01 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).