Re: [RFC PATCH 6/6] btrfs: zlib: add support for zlib-deflate through acomp

Gao Xiang
2025-05-27T02:45:46Z

On 2025/5/27 10:32, Gao Xiang wrote:
>
>
> On 2025/5/8 12:19, Eric Biggers wrote:
>
> ...
>
>>
>> BTW, I also have to wonder why this patchset is proposing accelerating zlib
>> instead of Zstandard.  Zstandard is a much more modern algorithm.
>
> I think simply because QAT doesn't support the Zstandard native offload.
> At least, for Intel Xeon Sapphire Rapids processors (it seems to have
> built-in QAT 4xxx), only LZ4 and deflate-family are natively supported.
>
> I've confirmed that SPR QAT deflate hardware decompresion already surpasses
> LZ4 software decompression on our cloud server setup, which is useful since
> it greatly improves decompression performance (even compared to software LZ4)
> and saves CPU overhead completely.

Also see:
https://intel.github.io/quickassist/PG/services_compression_api.html

for more details on QAT hardware native supported algorithms.

>
> For Zstandard, currently it seems it [1] just leverages part of the QAT
> engine: hardware sequence producer (matchfinder) to boost up Zstandard
> match finding And I think the current hardware QAT will have no positive
> effect on the Zstandard decompression.  Without hardware improvements, it
> seems it can be hardly changed.
>
> I think it's true for both 5th Sapphire Rapids processors and 6th Granite
> Rapids processors.  Correct if I'm wrong here but that is what I got so far.
>
> Thanks,
> Gao Xiang
>
> [1] https://github.com/intel/QAT-ZSTD-Plugin
>
>>
>> - Eric
>>
>