From: Nick Terrell <terrelln@meta.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"qat-linux@intel.com" <qat-linux@intel.com>,
Nick Terrell <terrelln@meta.com>,
"dsterba@suse.com" <dsterba@suse.com>
Subject: Re: [PATCH] crypto: zstd - convert to acomp
Date: Mon, 19 May 2025 14:50:01 +0000 [thread overview]
Message-ID: <30EB61A2-ECFE-4025-84C2-A6C97F1654C6@meta.com> (raw)
In-Reply-To: <20250516170642.GE1241@sol>
> On May 16, 2025, at 1:06 PM, Eric Biggers <ebiggers@kernel.org> wrote:
>
> >
> On Fri, May 16, 2025 at 04:43:31PM +0100, Suman Kumar Chakraborty wrote:
>> Convert the implementation to a native acomp interface using zstd
>> streaming APIs, eliminating the need for buffer linearization.
>
> How does this affect performance?
Zstd does two extra things when using the streaming API:
1. Allocates a buffer of (Window_Size + 128KB).
2. Both compression and decompression have to copy data into / out of that buffer.
This means there will be an extra memcpy during (de)compression.
I don't know how that will compare against any efficiency gains from
switching to the acomp API. It would be great to see benchmarks here.
When all the data is presented in the first call to the streaming API, and Zstd can
guarantee that there is enough output space, these memcpys can be elided. This
happens, for example, when the data is smaller than the buffer chunk size.
Best,
Nick
> - Eric
next prev parent reply other threads:[~2025-05-19 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 15:43 [PATCH] crypto: zstd - convert to acomp Suman Kumar Chakraborty
2025-05-16 17:06 ` Eric Biggers
2025-05-19 14:50 ` Nick Terrell [this message]
2025-05-18 21:01 ` Corentin Labbe
2025-05-20 7:57 ` Suman Kumar Chakraborty
2025-05-20 12:13 ` Corentin Labbe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30EB61A2-ECFE-4025-84C2-A6C97F1654C6@meta.com \
--to=terrelln@meta.com \
--cc=dsterba@suse.com \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=suman.kumar.chakraborty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox