Re: [PATCH] mm: zswap: Use SG list decompression APIs from zsmalloc
From: Nhat Pham
Date: Tue Feb 03 2026 - 18:20:53 EST
On Tue, Jan 20, 2026 at 7:49 PM Sergey Senozhatsky
<senozhatsky@xxxxxxxxxxxx> wrote:
>
> On (26/01/21 01:36), Yosry Ahmed wrote:
> > Use the new zs_obj_read_sg_*() APIs in zswap_decompress(), instead of
> > zs_obj_read_*() APIs returning a linear address. The SG list is passed
> > directly to the crypto API, simplifying the logic and dropping the
> > workaround that copies highmem addresses to a buffer. The crypto API
> > should internally linearize the SG list if needed.
> >
> > This avoids the memcpy() in zsmalloc for objects spanning multiple
> > pages, although an equivalent operation will be done internally by
> > acomp/scomp. However, in the future compression algorithms could support
> > handling discontiguous SG lists, completely eliminating the copying for
> > spanning objects.
>
Ah for some reasons, I did not see this one - I reviewed on the other
thread. My apologies.
Anyway, just to re-iterate:
Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>