lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z7FzTLPSrnixkvGQ@gondor.apana.org.au>
Date: Sun, 16 Feb 2025 13:10:36 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Kanchana P Sridhar <kanchana.p.sridhar@...el.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, hannes@...xchg.org,
	yosry.ahmed@...ux.dev, nphamcs@...il.com, chengming.zhou@...ux.dev,
	usamaarif642@...il.com, ryan.roberts@....com, 21cnbao@...il.com,
	akpm@...ux-foundation.org, linux-crypto@...r.kernel.org,
	davem@...emloft.net, clabbe@...libre.com, ardb@...nel.org,
	ebiggers@...gle.com, surenb@...gle.com, kristen.c.accardi@...el.com,
	wajdi.k.feghali@...el.com, vinodh.gopal@...el.com
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@...el.com>
> ---
>  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,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ