Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick support for zstd's external sequence producer API #2

Open
wants to merge 2 commits into
base: zstd-next
Choose a base branch
from

Conversation

embg
Copy link

@embg embg commented Dec 28, 2023

Outdated. Please refer to the new PR.

@embg embg force-pushed the quickassist branch 3 times, most recently from 8c3cfb1 to 005f476 Compare December 28, 2023 21:13
Copy link
Owner

@terrelln terrelln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the debug.c change, and make sure there are no other unintended changes.

lib/zstd/common/debug.c Outdated Show resolved Hide resolved
Cherry-picks support for using zstd's external sequence producer API in the
kernel. This unblocks the use of QuickAssist hardware acceleration for zstd in
applications such as BTRFS.

Some context: the kernel uses ZSTD_initStaticCCtx() to create compression
contexts. This function builds the compression context in a user-provided buffer
which must be sized according to the compression parameters. zstd provides size
estimation functions for this purpose, but until now they were not compatible
with the external sequence producer API.

This cherry-pick fixes that incompatibility. More specifically, it pulls in zstd
upstream PRs #3839 and #3854. PR #3854 includes a unit test (upstream only)
which validates that the external sequence producer API works correctly in
conjunction with ZSTD_initStaticCCtx().

To build this commit, I first cherry-picked the relevant upstream commits onto
the upstream v1.5.5-kernel tag:
  cd ~/repos/zstd
  git checkout tags/v1.5.5-kernel
  git cherry-pick -m 1 126ec2669c927b24acd38ea903a211c1b5416588
  git cherry-pick c6cabf94417d84ebb5da62e05d8b8a9623763585

I then ran "make import" to copy the changes into my fork of Linux:
  cd ~/repos/zstd/contrib/linux-kernel/
  make import

Signed-off-by: Elliot Gorokhovsky <[email protected]>
@embg embg requested a review from terrelln December 28, 2023 21:38
@embg embg force-pushed the quickassist branch 8 times, most recently from 7247a9d to 11a0569 Compare May 20, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants