Re: [PATCH 5/5] block: remove bio_integrity_process

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

 



On 6/27/2024 9:17 PM, Christoph Hellwig wrote:
> On Thu, Jun 27, 2024 at 09:06:56PM +0530, Kanchan Joshi wrote:
>> The bi->csum_type is constant as far as this bio_for_each_segment loop
>> is concerned.
>> Seems wasteful processing, and can rather be moved out where we set a
>> function pointer to point to either ext_pi_crc64_generate or
>> t10_pi_generate once.
> A function pointer is way more expensive than a few branches, especially
> easily predictable ones.
> 

In general yes. Maybe I can profile this particular case someday and get 
myself convinced. But regardless, I am unsure what the patch buys.

During write:
-               bio_integrity_process(bio, &bio->bi_iter);
+               blk_integrity_generate(bio);

During read:
-       bio->bi_status = bio_integrity_process(bio, &bip->bio_iter);
+       blk_integrity_verify(bio);

One less argument is passed, but common code of bio_integrity_process 
got mostly duplicated into blk_integrity_generate/verify now.




[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