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] [day] [month] [year] [list]
Message-ID: <aPhpCGz1dWoZsMeH@gondor.apana.org.au>
Date: Wed, 22 Oct 2025 13:18:00 +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,
	ying.huang@...ux.alibaba.com, akpm@...ux-foundation.org,
	senozhatsky@...omium.org, sj@...nel.org, kasong@...cent.com,
	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,
	vinicius.gomes@...el.com, wajdi.k.feghali@...el.com,
	vinodh.gopal@...el.com
Subject: Re: [PATCH v12 23/23] mm: zswap: Batched zswap_compress() with
 compress batching of large folios.

On Thu, Sep 25, 2025 at 08:35:02PM -0700, Kanchana P Sridhar wrote:
>
> Another initialization level optimization that happens in
> zswap_cpu_comp_prepare() is, only for batching compressors, we allocate
> extra memory for "batch-size" int pointers in the
> @acomp_ctx->req->__ctx[] that are statically set to track the output SG
> lists' lengths. This optimization was necessary to avoid the latency

There is no need for this allocation.  Just store the output lengths
in each destination scatterlist entry.

Before the call to acomp, the destination SG list should contain as
many elements as the number of units.  On return, the dst lengths
should be stored in each destination SG entry.

Cheers,
-- 
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