Re: [PATCH 2/4] block: inline fast path of driver tag allocation

Jens Axboe
2021-10-13T18:07:12Z

On 10/13/21 11:57 AM, Christoph Hellwig wrote:
> On Wed, Oct 13, 2021 at 11:46:04AM -0600, Jens Axboe wrote:
>> On 10/13/21 11:22 AM, Christoph Hellwig wrote:
>>> On Wed, Oct 13, 2021 at 10:49:35AM -0600, Jens Axboe wrote:
>>>> If we don't use an IO scheduler or have shared tags, then we don't need
>>>> to call into this external function at all. This saves ~2% for such
>>>> a setup.
>>>
>>> Hmm. What happens if you just throw an inline tag onto
>>> blk_mq_get_driver_tag?
>>
>> I'd be surprised if that's any different than my patch in terms of
>> performance, the fast path would be about the same. I don't feel
>> strongly about it, can do that instead.
>
> I find the double indirection in your patch a bit confusing. Not a big
> deal if it is actually required, but if we can avoid that I'd prefer
> not to add the extra indirection.

Tested the variants, and it does seem to be the best one...

--
Jens Axboe