Re: [PATCH v1 0/8] Batched zswap_store() with compression batching
From: Kanchana P. Sridhar
Date: Fri Oct 16 2026 - 00:43:03 EST
On Thu, Oct 15, 2026 at 9:38 PM Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Oct 15, 2026 at 08:32:21PM -0700, Kanchana P. Sridhar wrote:
> >
> > If you are Ok with all this, we will need Herbert's Ok for this change
> > in patch 3:
> >
> > diff --git a/crypto/acompress.c b/crypto/acompress.c
> > index 192ea996e779..db8e4c82b900 100644
> > --- a/crypto/acompress.c
> > +++ b/crypto/acompress.c
> > @@ -293,8 +293,12 @@ int crypto_acomp_compress(struct acomp_req *req)
> > return -EAGAIN;
> >
> > if (likely(req->unit_size && acomp_request_issg(req))) {
> > - if (!crypto_acomp_req_seg(tfm))
> > - return acomp_do_req_chain(req, true);
> > + if (likely(!crypto_acomp_req_seg(tfm))) {
> > + int err = tfm->compress(req);
> > +
> > + req->dst->length = unlikely(err) ? err : req->dlen;
> > + return err;
> > + }
>
> What if you put this short-circuit into acomp_do_req_chain instead,
> does it still give you the same performance boost?
Sure, that's a great idea! I will let you know if this gives the same
performance boost.
Thanks,
Kanchana
>
> Cheers,
> --
> Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt