RE: [PATCH v9 10/19] crypto: acomp - New interfaces to facilitate batching support in acomp & drivers.
From: Sridhar, Kanchana P
Date: Fri May 16 2025 - 15:17:52 EST
> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, May 13, 2025 1:04 AM
> To: Sridhar, Kanchana P <kanchana.p.sridhar@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx;
> hannes@xxxxxxxxxxx; yosry.ahmed@xxxxxxxxx; nphamcs@xxxxxxxxx;
> chengming.zhou@xxxxxxxxx; usamaarif642@xxxxxxxxx;
> ryan.roberts@xxxxxxx; 21cnbao@xxxxxxxxx;
> ying.huang@xxxxxxxxxxxxxxxxx; akpm@xxxxxxxxxxxxxxxxxxxx;
> senozhatsky@xxxxxxxxxxxx; linux-crypto@xxxxxxxxxxxxxxx;
> davem@xxxxxxxxxxxxx; clabbe@xxxxxxxxxxxx; ardb@xxxxxxxxxx;
> ebiggers@xxxxxxxxxx; surenb@xxxxxxxxxx; Accardi, Kristen C
> <kristen.c.accardi@xxxxxxxxx>; Gomes, Vinicius <vinicius.gomes@xxxxxxxxx>;
> Feghali, Wajdi K <wajdi.k.feghali@xxxxxxxxx>; Gopal, Vinodh
> <vinodh.gopal@xxxxxxxxx>
> Subject: Re: [PATCH v9 10/19] crypto: acomp - New interfaces to facilitate
> batching support in acomp & drivers.
>
> On Thu, May 08, 2025 at 12:41:25PM -0700, Kanchana P Sridhar wrote:
> > This commit adds get_batch_size(), batch_compress() and
> batch_decompress()
> > interfaces to:
> >
> > struct acomp_alg
> > struct crypto_acomp
>
> An array-based interface is not acceptable.
Hi Herbert,
Thanks for your patch-sets [1, 2, 3] "crypto: acomp - Add compression segmentation
support". I went through these patches, and had a clarification question:
IIUC, [3] allows us to set up a large folio to be compressed in one shot by calling:
acomp_request_set_src_unit(req):
Sets up the request with a [large] folio as input scatterlist to be compressed
in PAGE_SIZE units.
acomp_do_req_chain(req), acomp_reqchain_finish(req):
Compress the [large] folio in PAGE_SIZE chunks.
It appears acomp_do_req_chain() and acomp_reqchain_finish() compress the
folio units in a chained, synchronous manner. If so, I cannot see how a hardware
accelerator that can do [de]compressions in parallel, will be able to submit
multiple [de]compress jobs simultaneously. Without this, a hardware accelerator
such as IAA would unfortunately not get the benefit of parallelism that we are
seeking.
Can you please advise on how to overcome this?
[1]: https://patchwork.kernel.org/project/linux-crypto/patch/e4ca39a0ada7deaaf86dd1a40a717b30cc3e462f.1746102673.git.herbert@xxxxxxxxxxxxxxxxxxx/
[2]: https://patchwork.kernel.org/project/linux-crypto/patch/4be83ed9da46eb4e8a309fa37e3050766ea2784c.1746102673.git.herbert@xxxxxxxxxxxxxxxxxxx/
[3]: https://patchwork.kernel.org/project/linux-crypto/patch/c48990bee119c8a7b0a04edc7de4065723025a16.1746102673.git.herbert@xxxxxxxxxxxxxxxxxxx/
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