Re: [PATCH 10/14] blk-mq: initial support for multiple queue maps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2018-10-29 at 10:37 -0600, Jens Axboe wrote:
+AD4 -static int cpu+AF8-to+AF8-queue+AF8-index(unsigned int nr+AF8-queues, const int cpu)
+AD4 +-static int cpu+AF8-to+AF8-queue+AF8-index(struct blk+AF8-mq+AF8-queue+AF8-map +ACo-qmap,
+AD4 +-			      unsigned int nr+AF8-queues, const int cpu)
+AD4  +AHs
+AD4 -	return cpu +ACU nr+AF8-queues+ADs
+AD4 +-	return qmap-+AD4-queue+AF8-offset +- (cpu +ACU nr+AF8-queues)+ADs
+AD4  +AH0
+AD4 
+AD4 +AFs ... +AF0
+AD4  
+AD4 --- a/include/linux/blk-mq.h
+AD4 +-+-+- b/include/linux/blk-mq.h
+AD4 +AEAAQA -78,10 +-78,11 +AEAAQA struct blk+AF8-mq+AF8-hw+AF8-ctx +AHs
+AD4  struct blk+AF8-mq+AF8-queue+AF8-map +AHs
+AD4  	unsigned int +ACo-mq+AF8-map+ADs
+AD4  	unsigned int nr+AF8-queues+ADs
+AD4 +-	unsigned int queue+AF8-offset+ADs
+AD4  +AH0AOw

I think it's unfortunate that the blk-mq core uses the .queue+AF8-offset member but
that mapping functions in block drivers are responsible for setting that member.
Since the block driver mapping functions have to set blk+AF8-mq+AF8-queue+AF8-map.nr+AF8-queues,
how about adding a loop in blk+AF8-mq+AF8-update+AF8-queue+AF8-map() that derives .queue+AF8-offset
from .nr+AF8-queues from previous array entries?

Thanks,

Bart.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux