Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

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

 



On 11/14/18 8:20 AM, Christoph Hellwig wrote:
> On Sat, Nov 10, 2018 at 08:13:14AM -0700, Jens Axboe wrote:
>> This saves an indirect function call everytime we have to
>> call one of the strategy functions. We keep it const, and just
>> hack around that a bit in blk_mq_init_allocated_queue(), which
>> is where we copy the ops in.
> 
> What amount of difference does this patch make?
> 
> This really defeats the whole constification, which doesn't hinge
> on the const attribute itself, but on having the static ops in
> a read-only mapped section.  So unless it is a real measurable
> and big enough difference I'm against this patch, and if there is
> a real an measurable difference we might have to find other ways
> to archive this goal.

It's measurable. It doesn't defeat the const at all, the mq_ops
is still const and is never modified outside of when the queue
is allocated. The only difference is of course that it is no
longer residing in a read only mapped section, which is a shame.

I'll try and do some specific numbers.

-- 
Jens Axboe




[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