The Zstandard (Zstd) compression code sadly hasn’t been regularly synced with the latest upstream Linux kernel sources but a patch posted this evening goes ahead and syncs the in-kernel Zstd code against the Zstd 1.5.7 state.
Nick Terrell of Meta/Facebook posted the patch for importing the upstream Zstd 1.5.7 source code into the Linux kernel. Besides bringing some performance improvements and other enhancements, Intel engineers have been desiring this in-kernel update to expose the Zstd APIs to allow QAT acceleration for speeding up the LZ match finding stage of Zstd. This in turn can yield additional performance benefits on Intel QAT-enabled hardware.
Benchmarks of Btrfs compression using Zstd with this newly-updated code shows a mix of speed-ups and some regressions across a range of compression and decompression tests.
Those interested in this long overdue sync of Zstd 1.5.7 — and in turn 1.5.4 through 1.5.6 too — for the Linux kernel can see this patch on the Linux kernel mailing list. Hopefully it manages to get upstreamed in the next kernel merge window.