[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aV9lOve5tabZqKSt@gondor.apana.org.au>
Date: Thu, 8 Jan 2026 16:05:14 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Nhat Pham <nphamcs@...il.com>, Minchan Kim <minchan@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
Brian Geffon <bgeffon@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [RFC PATCH 2/2] zsmalloc: chain-length configuration should
consider other metrics
On Thu, Jan 08, 2026 at 08:01:20AM +0000, Yosry Ahmed wrote:
>
> IIUC based on Herbert's previous response, crypto and scomp already
> support passing in a discontiguous SG-list. So for zswap, if zsmalloc
> returns an SG-list, it will just be passed as-is to the crypto API.
>
> If zram can also use the SG-list, then we can completely drop the
> memcpy() logic from zsmalloc.
>
> Herbert, please correct me if I am wrong.
You're correct. The SG support has always been there. You can
use that today and scomp will perform the memcpy for you if and
only if it's necessary.
The algorithm-specific SG support would simply be a performance
enhancement that eliminates the memcpy entirely for whichever
algorithm that we choose to implement it for.
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