Re: [PATCH 2/2] block: store bdev->bd_disk->fops->submit_bio state in bdev

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

 



On 4/15/23 11:53 PM, Christoph Hellwig wrote:
> On Fri, Apr 14, 2023 at 07:48:48AM -0600, Jens Axboe wrote:
>> We have a long chain of memory dereferencing just to whether or not
>> this disk has a special submit_bio helper. As that's not necessarily
>> the common case, add a bd_submit_bio state in the bdev to avoid
>> traversing this memory dependency chain if we don't need to.
> 
> Do you have any numbers on how this helps?

I didn't run any numbers, but seems obvious to me that we don't want
to pull in 3 layers deep of pointer indirections when we can avoid
it.

>> +	bdev->bd_submit_bio = 0;
> 
> bd_submit_bio sounds like a function call, so I'd name this
> bd_has_submit_io.

Good point, I'll rename it.

> But maybe it might make more sense to just add a bit that this is
> a blk-mq backed device into bd_state as that might be handy in other
> places as well?

I'd rather just do that if needed.

-- 
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