Re: [PATCH 3/4] virtio-blk: avoid function call in the fast path

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

 



On 4/20/22 08:16, Stefan Hajnoczi wrote:
> On Tue, Apr 19, 2022 at 09:10:52PM -0700, Chaitanya Kulkarni wrote:
>> We can avoid a function call virtblk_map_data() in the fast path if
>> block layer request has no physical segments by moving the call
>> blk_rq_nr_phys_segments() from virtblk_map_data() to virtio_queue_rq().
>>
>> Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
>> ---
>>   drivers/block/virtio_blk.c | 15 +++++++--------
>>   1 file changed, 7 insertions(+), 8 deletions(-)
> 
> virtblk_map_data() is a static function that is not called by anything
> else in virtio_blk.c. The disassembly on my x86_64 machine shows it has
> been inlined into virtio_queue_rq(). The compiler has already done what
> this patch is trying to do (and more).
> 
> Can you share performance data or some more background on why this
> code change is necessary?
> 
>

I don't have performance numbers, but when reading the code it
takes to a function call especially in the fast path where
read/write requests has phys segments and those are probably
most frequent requests...

I'll drop it from V2, if I find performance numbers then I'll
repost is with the quantitative data ...

-ck






[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