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