Re: [PATCH v2] lib/lz4: backport upstream fast decode loop

From: S. Biplab Raut

Date: Wed Nov 18 2026 - 13:28:39 EST


Hi Andrew,

Please drop this patch. As you suggested, I compared notes with Michal
Wilczynski's series [1], and I'll contribute there instead of carrying
a parallel backport. His series vendors upstream LZ4 v1.10.0, which
brings the same fast decode loop together with the in-place margin
change this patch lacked, so it supersedes this one.

On the three review points against this patch, two are real bugs in
this v2 and the third is a divergence from upstream.

I've posted KUnit tests for lib/lz4 on top of Michal's series, in his v2
thread ("lib/lz4: add KUnit tests for compression and decompression").
They cover the first two points. They also port upstream's worst-case
in-place test: upstream has since raised its own margin to + 65 for the
64-byte wild copies its decoder makes since v1.11.0 [2], so the kernel's
margin will need the same change if lib/lz4 is re-synced past v1.10.0.

[1] https://lore.kernel.org/r/20261106-lz4-vendor-upstream-v2-0-ee04c3f0d7dc@xxxxxxxxxxx
[2] https://github.com/lz4/lz4/pull/2104

Thanks,
Biplab