mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Kanchana P. Sridhar" <kanchanapsridhar2026@gmail.com>
Cc: Yosry Ahmed <yosry@kernel.org>,
	hannes@cmpxchg.org, nphamcs@gmail.com, chengming.zhou@linux.dev,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, rientjes@google.com,
	willy@infradead.org, senozhatsky@chromium.org
Subject: Re: [PATCH v1 0/8] Batched zswap_store() with compression batching
Date: Fri, 16 Oct 2026 15:38:20 +1100	[thread overview]
Message-ID: <atGqPIpUfX0LDokV@gondor.apana.org.au> (raw)
In-Reply-To: <CACpmpofYXDMviE6FS-BZdVntmQFvS+_xvfmOnJ2caZFerz6vyg@mail.gmail.com>

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?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2026-10-16  4:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 18:28 Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 1/8] crypto: acomp - Define a unit_size in struct acomp_req to enable batching. mm: zswap: Set the unit size for zswap to PAGE_SIZE Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 2/8] crypto: acomp - Add bit to indicate segmentation support Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 3/8] crypto: acomp - Add trivial segmentation wrapper Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 4/8] crypto: acomp - Add API to get a compression algorithm's batch-size Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 5/8] mm: zswap: Store the folio's node id in the zswap_entry Kanchana P. Sridhar
2026-10-14  0:18   ` Yosry Ahmed
2026-10-14  1:17     ` Kanchana P. Sridhar
2026-10-14 15:17       ` Yosry Ahmed
2026-10-15 21:30         ` Kanchana P. Sridhar
2026-10-15 21:39           ` Yosry Ahmed
2026-10-15 22:45             ` Kanchana P. Sridhar
2026-10-15 22:48               ` Yosry Ahmed
2026-10-15 22:55                 ` Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 6/8] mm: zswap: Store large folios in batches Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 7/8] mm: zswap: Optimally place members of struct zswap_pool, struct zswap_entry Kanchana P. Sridhar
2026-10-14 15:42   ` Yosry Ahmed
2026-10-15 21:48     ` Kanchana P. Sridhar
2026-10-15 22:06       ` Yosry Ahmed
2026-10-15 22:53         ` Kanchana P. Sridhar
2026-10-08 18:28 ` [PATCH v1 8/8] mm: zswap: Batched zswap_compress() for storing large folios in batches Kanchana P. Sridhar
2026-10-14 15:45 ` [PATCH v1 0/8] Batched zswap_store() with compression batching Yosry Ahmed
2026-10-15 22:00   ` Kanchana P. Sridhar
2026-10-15 22:04     ` Yosry Ahmed
2026-10-15 22:51       ` Kanchana P. Sridhar
2026-10-15 22:59         ` Yosry Ahmed
2026-10-15 23:40           ` Kanchana P. Sridhar
2026-10-15 23:44             ` Yosry Ahmed
2026-10-16  3:32               ` Kanchana P. Sridhar
2026-10-16  4:38                 ` Herbert Xu [this message]
2026-10-16  4:42                   ` Kanchana P. Sridhar
2026-10-16 16:14 ` Yosry Ahmed

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=atGqPIpUfX0LDokV@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=davem@davemloft.net \
    --cc=hannes@cmpxchg.org \
    --cc=kanchanapsridhar2026@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=rientjes@google.com \
    --cc=senozhatsky@chromium.org \
    --cc=willy@infradead.org \
    --cc=yosry@kernel.org \
    /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

all inboxes | Powered by JetHome®