RE: [PATCH v6 02/16] crypto: acomp - Define new interfaces for compress/decompress batching.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Herbert,

> -----Original Message-----
> From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Sent: Saturday, February 15, 2025 9:11 PM
> 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; akpm@xxxxxxxxxxxxxxxxxxxx;
> linux-crypto@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; clabbe@xxxxxxxxxxxx;
> ardb@xxxxxxxxxx; ebiggers@xxxxxxxxxx; surenb@xxxxxxxxxx; Accardi,
> Kristen C <kristen.c.accardi@xxxxxxxxx>; Feghali, Wajdi K
> <wajdi.k.feghali@xxxxxxxxx>; Gopal, Vinodh <vinodh.gopal@xxxxxxxxx>
> Subject: Re: [PATCH v6 02/16] crypto: acomp - Define new interfaces for
> compress/decompress batching.
> 
> On Wed, Feb 05, 2025 at 11:20:48PM -0800, Kanchana P Sridhar wrote:
> > This commit adds get_batch_size(), batch_compress() and
> batch_decompress()
> > interfaces to:
> >
> >   struct acomp_alg
> >   struct crypto_acomp
> >
> > A crypto_acomp compression algorithm that supports batching of
> compressions
> > and decompressions must provide implementations for these API.
> >
> > A new helper function acomp_has_async_batching() can be invoked to
> query if
> > a crypto_acomp has registered these batching interfaces.
> >
> > A higher level module like zswap can call acomp_has_async_batching() to
> > detect if the compressor supports batching, and if so, it can call
> > the new crypto_acomp_batch_size() to detect the maximum batch-size
> > supported by the compressor. Based on this, zswap can use the minimum of
> > any zswap-specific upper limits for batch-size and the compressor's max
> > batch-size, to allocate batching resources.
> >
> > This allows the iaa_crypto Intel IAA driver to register implementations for
> > the get_batch_size(), batch_compress() and batch_decompress() acomp_alg
> > interfaces, that can subsequently be invoked from the kernel zswap/zram
> > modules to compress/decompress pages in parallel in the IAA hardware
> > accelerator to improve swapout/swapin performance through these newly
> added
> > corresponding crypto_acomp API:
> >
> >   crypto_acomp_batch_size()
> >   crypto_acomp_batch_compress()
> >   crypto_acomp_batch_decompress()
> >
> > Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx>
> > ---
> >  crypto/acompress.c                  |   3 +
> >  include/crypto/acompress.h          | 111 ++++++++++++++++++++++++++++
> >  include/crypto/internal/acompress.h |  19 +++++
> >  3 files changed, 133 insertions(+)
> 
> Please get rid of these batch interfaces.  The whole point of
> request chaining is to remove the distinction between batching
> and normal requests.  IOW, if a request is chained then it is
> automatically processed as a batch.  If it's a singleton then
> normal processing will occur.

Thanks. I have incorporated this suggestion in v7. I would appreciate
it if you can review patch 1 in the v7 that I will be submitting shortly.

Thanks,
Kanchana

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





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux