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? > + bdev->bd_submit_bio = 0; bd_submit_bio sounds like a function call, so I'd name this bd_has_submit_io. 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?