Skip to contentSkip to conversation

zsmalloc-introduce-sg-list-based-object-read-api.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: zsmalloc: introduce SG-list based object read API
has been removed from the -mm tree. Its filename was
zsmalloc-introduce-sg-list-based-object-read-api.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Sergey Senozhatsky <[email protected]>
Subject: zsmalloc: introduce SG-list based object read API
Date: Tue, 13 Jan 2026 12:46:45 +0900

Currently, zsmalloc performs address linearization on read (which sometimes requires memcpy() to a local buffer). Not all zsmalloc users need a linear address. For example, Crypto API supports SG-list, performing linearization under the hood, if needed. In addition, some compressors can have native SG-list support, completely avoiding the linearization step.

Provide an SG-list based zsmalloc read API:
- zs_obj_read_sg_begin()
- zs_obj_read_sg_end()

This API allows callers to obtain an SG representation of the object (one entry for objects that are contained in a single page and two entries for spanning objects), avoiding the need for a bounce buffer and memcpy.

---

 include/linux/zsmalloc.h |    4 ++
 mm/zsmalloc.c            |   63 +++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
include/linux/zsmalloc.h renamed from include/linux/zsmalloc.h~zsmalloc-introduce-sg-list-based-object-read-api +4 -0
@@ -22,6 +22,7 @@ struct zs_pool_stats {
 };
 
 struct zs_pool;
+struct scatterlist;
 
 struct zs_pool *zs_create_pool(const char *name);
 void zs_destroy_pool(struct zs_pool *pool);
@@ -43,6 +44,9 @@ void *zs_obj_read_begin(struct zs_pool *
 			size_t mem_len, void *local_copy);
 void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
 		     size_t mem_len, void *handle_mem);
+void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
+			  struct scatterlist *sg, size_t mem_len);
+void zs_obj_read_sg_end(struct zs_pool *pool, unsigned long handle);
 void zs_obj_write(struct zs_pool *pool, unsigned long handle,
 		  void *handle_mem, size_t mem_len);
 
mm/zsmalloc.c renamed from mm/zsmalloc.c~zsmalloc-introduce-sg-list-based-object-read-api +63 -0

75 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

zram-rename-init_lock-to-dev_lock.patch
zsmalloc-make-common-caches-global.patch