From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Yosry Ahmed <yosry.ahmed@linux.dev>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Nhat Pham <nphamcs@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: zswap: Use SG list decompression APIs from zsmalloc
Date: Wed, 21 Jan 2026 12:49:47 +0900 [thread overview]
Message-ID: <uhugzqn3k46hchtk4srsa3uoml4ach5qpl4xm5xqdq6egesvq4@7i7phlkyzjgf> (raw)
In-Reply-To: <20260121013615.2906368-1-yosry.ahmed@linux.dev>
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.
LGTM.
Once the API lands I think we'll be quite interested in discontiguous
SG lists support in lzo-rle/lzo and lz4 (most commonly used primary
S/W compressors in zram).
next prev parent reply other threads:[~2026-01-21 3:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 1:36 Yosry Ahmed
2026-01-21 3:49 ` Sergey Senozhatsky [this message]
2026-02-03 23:18 ` Nhat Pham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uhugzqn3k46hchtk4srsa3uoml4ach5qpl4xm5xqdq6egesvq4@7i7phlkyzjgf \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosry.ahmed@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox