Re: [PATCH 0/7] blk-mq: fix queue quiescing

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

 



On Thu, 2017-05-25 at 11:42 -0600, Jens Axboe wrote:
> Why not make it
> 
> 	/* Must be the last member - see also blk_mq_hw_ctx_size(). */
> 	struct srcu_struct	queue_rq_srcu[0];
> 
> and fixup blk_mq_hw_ctx_size()
> 
> static int blk_mq_hw_ctx_size(struct request_queue *q)
> {
> 	int size = sizeof(struct blk_mq_hw_ctx);
> 
> 	if (q->tag_set->flags & BLK_MQ_F_BLOCKING)
> 		size += sizeof(struct srcu_struct);
> 
> 	return size;
> }
> 
> I think that'd be cleaner. Keep the end-of-struct checking, just to be
> on the safe side.
> 
> Neither one is super pretty though, and still doesn't fix the fact that
> the srcu_struct is _half_ the blk_mq_hw_ctx in total.

Hello Jens,

Making these changes seems like a good idea to me. I will make these changes
and post a patch.

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