linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] zswap: remove the memcpy if acomp is not sleepable
@ 2024-02-22  8:11 Barry Song
  2024-02-22  8:11 ` [PATCH v6 1/2] crypto: introduce: acomp_is_async to expose if comp drivers might sleep Barry Song
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Barry Song @ 2024-02-22  8:11 UTC (permalink / raw)
  To: akpm, davem, hannes, herbert, linux-crypto, linux-mm, nphamcs,
	yosryahmed, zhouchengming
  Cc: chriscli, chrisl, ddstreet, linux-kernel, sjenning, vitaly.wool,
	Barry Song

From: Barry Song <v-songbaohua@oppo.com>

In zswap, if we use zsmalloc, we cannot sleep while we map the
compressed memory, so we copy it to a temporary buffer. By
knowing the alg won't sleep can help zswap to avoid the
memcpy.
Thus we introduce an API in crypto to expose if acomp is async,
and zswap can use it to decide if it can remove copying to the
tmp buffer.

-v6:
 * add acked-by of Herbert, Thanks!
 * remove patch 3/3 from the series, as that one will go
   through crypto

Barry Song (2):
  crypto: introduce: acomp_is_async to expose if comp drivers might
    sleep
  mm/zswap: remove the memcpy if acomp is not sleepable

 include/crypto/acompress.h | 6 ++++++
 mm/zswap.c                 | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-03-19 11:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22  8:11 [PATCH v6 0/2] zswap: remove the memcpy if acomp is not sleepable Barry Song
2024-02-22  8:11 ` [PATCH v6 1/2] crypto: introduce: acomp_is_async to expose if comp drivers might sleep Barry Song
2024-02-24 16:52   ` Chris Li
2024-02-22  8:11 ` [PATCH v6 2/2] mm/zswap: remove the memcpy if acomp is not sleepable Barry Song
2024-02-24 16:53   ` Chris Li
2024-03-08 11:57 ` [PATCH v6 0/2] zswap: " Barry Song
2024-03-09  3:23   ` Andrew Morton
2024-03-09  3:58     ` Barry Song
2024-03-09  4:36       ` Andrew Morton
2024-03-09  4:42         ` Andrew Morton
2024-03-09  4:56           ` Barry Song
2024-03-09  5:08             ` Barry Song
2024-03-08 12:11 ` Johannes Weiner
2024-03-19 11:00   ` Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).