[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SA3PR11MB8120161A21D2DA07F23B9392C9CC2@SA3PR11MB8120.namprd11.prod.outlook.com>
Date: Fri, 28 Feb 2025 10:00:17 +0000
From: "Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "hannes@...xchg.org"
<hannes@...xchg.org>, "yosry.ahmed@...ux.dev" <yosry.ahmed@...ux.dev>,
"nphamcs@...il.com" <nphamcs@...il.com>, "chengming.zhou@...ux.dev"
<chengming.zhou@...ux.dev>, "usamaarif642@...il.com"
<usamaarif642@...il.com>, "ryan.roberts@....com" <ryan.roberts@....com>,
"21cnbao@...il.com" <21cnbao@...il.com>, "akpm@...ux-foundation.org"
<akpm@...ux-foundation.org>, "linux-crypto@...r.kernel.org"
<linux-crypto@...r.kernel.org>, "davem@...emloft.net" <davem@...emloft.net>,
"clabbe@...libre.com" <clabbe@...libre.com>, "ardb@...nel.org"
<ardb@...nel.org>, "ebiggers@...gle.com" <ebiggers@...gle.com>,
"surenb@...gle.com" <surenb@...gle.com>, "Accardi, Kristen C"
<kristen.c.accardi@...el.com>, "Feghali, Wajdi K"
<wajdi.k.feghali@...el.com>, "Gopal, Vinodh" <vinodh.gopal@...el.com>,
"Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>
Subject: RE: [PATCH v6 02/16] crypto: acomp - Define new interfaces for
compress/decompress batching.
Hi Herbert,
> -----Original Message-----
> From: Herbert Xu <herbert@...dor.apana.org.au>
> Sent: Saturday, February 15, 2025 9:11 PM
> To: Sridhar, Kanchana P <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; Accardi,
> Kristen C <kristen.c.accardi@...el.com>; Feghali, Wajdi K
> <wajdi.k.feghali@...el.com>; Gopal, Vinodh <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. 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@...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