Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
lib: zstd: Upgrade to latest upstream zstd version 1.4.6
Upgrade to the latest upstream zstd version 1.4.6. This patch is 100% generated from upstream zstd commit c4763f087c2b [0]. This patch is very large because it is transitioning from the custom kernel zstd to using upstream directly. The new zstd follows upstreams file structure which is different. Future update patches will be much smaller because they will only contain the changes from one upstream zstd release. The benefits of this patch are as follows: 1. Using upstream directly with automated script to generate kernel code. This allows us to update the kernel every upstream release, so the kernel gets the latest bug fixes and performance improvements, and doesn't get 3 years out of date again. The automation and the translated code are tested every upstream commit to ensure it continues to work. 2. Upgrades from a custom zstd based on 1.3.1 to 1.4.6, getting 3 years of performance improvements and bug fixes. On x86_64 I've measured 15% faster BtrFS and SquashFS decompression+read speeds, 35% faster kernel decompression, and 30% faster ZRAM decompression+read speeds. Additionally, the latest zstd uses ~1 KB less stack space for compression. 3. Switches to using the upstream API directly. It is slightly less ergonomic for the kernel use case, where malloc/free aren't provided. But, it means that users don't need to familiarize themselves with 2 zstd APIs. I chose the bulk update instead of replaying upstream commits because there have been ~3500 upstream commits since the 1.3.1 release, zstd wasn't ready to be used in the kernel as-is before a month ago, and not all upstream zstd commits build. The bulk update preserves bisectablity because bugs can be bisected to the zstd version update. At that point the update can be reverted, and we can work with upstream to find and fix the bug. Note that upstream zstd release 1.4.6 doesn't exist yet. I have cut a staging branch at c4763f087c2b [0] and will apply any changes requested to the staging branch. Once we're ready to merge this update I will cut a zstd release at the commit we merge, so we have a known zstd release in the kernel. [0] facebook/zstd@c4763f0 Signed-off-by: Nick Terrell <terrelln@fb.com>
- Loading branch information