Re: [PATCH v13 22/22] mm: zswap: Batched zswap_compress() with compress batching of large folios.
From: Herbert Xu
Date: Sun Dec 07 2025 - 22:24:26 EST
On Wed, Nov 26, 2025 at 08:05:40PM +0000, Sridhar, Kanchana P wrote:
>
> Herbert, to make sure I understand, will you be implementing all of these
> features in crypto_acomp for software compressors? I would appreciate it
> if you can clarify:
>
> 1) Error & compressed length propagation to the dst sg->length only for
> non-batching compressors.
> a) For batching compressors, this wouldn't apply since errors could occur
> for any page in the batch, and the first page (dst sg->length) could have
> successfully compressed.
This would be the first step.
> 2) Will you also be handling the case where zswap can send an SG list batch
> with multiple pages to a non-batching compressor, and the crypto_acomp
> API will internally compress each page sequentially, propagate
> errors/compress lengths before returning?
>
> If so, this would really standardize the code in zswap for batching and
> non-batching compressors.
Yes this will be done as the next step. My understanding is that
your patch-set doesn't require this yet as all non-batching compressors
will have a batch size of 1.
But yes this certainly will be extended, not just with sequential
processing, but we could also use pcrypt/cryptd to parallelise the
compression across CPUs.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt