Linux 6.11 Likely To Land DM-Verity Multi-Buffer Hashing For Big Speed Boost

Written by Michael Larabel in Linux Storage on 5 July 2024 at 09:48 AM EDT. 1 Comment
LINUX STORAGE
One of several nice Linux performance optimizations recently by Eric Biggers of Google has been speeding up DM-Verity via multi-buffer hashing. DM-Verity is used for transparent integrity checking of block devices and this multi-buffer hashing code looks like it will land with the upcoming Linux 6.11 cycle.

The DM-Verity patch to enhance the performance via multi-buffer hashing has now been queued into Biggers' "crypto-pending" branch. In turn it will likely be submitted for the Linux 6.11 merge window later this month, assuming it gets picked up into the "cryptodev" in the next one~two weeks.

Intel and AMD x86_64 server CPUs


Biggers explains in the patch:
"When supported by the hash algorithm, use crypto_shash_finup_mb() to interleave the hashing of pairs of data blocks. On some CPUs this nearly doubles hashing performance. The increase in overall throughput of cold-cache dm-verity reads that I'm seeing on arm64 and x86_64 is roughly 35% (though this metric is hard to measure as it jumps around a lot).

For now this is only done on data blocks, not Merkle tree blocks. We could use finup_mb on Merkle tree blocks too, but that is less important as there aren't as many Merkle tree blocks as data blocks, and that would require some additional code restructuring."

About 35% better performance on ARM64 and x86_64 hardware for DM-Verity with this new multi-buffer hashing.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week