Skip to contentSkip to conversation

zsmalloc-add-zpool_ops-field-to-zs_pool-to-store-evict-handlers.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 12, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: zsmalloc: add zpool_ops field to zs_pool to store evict handlers
has been removed from the -mm tree. Its filename was
zsmalloc-add-zpool_ops-field-to-zs_pool-to-store-evict-handlers.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: Nhat Pham <[email protected]>
Subject: zsmalloc: add zpool_ops field to zs_pool to store evict handlers
Date: Mon, 28 Nov 2022 11:16:14 -0800

This adds a new field to zs_pool to store evict handlers for writeback, analogous to the zbud allocator.

---

 mm/zsmalloc.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
mm/zsmalloc.c renamed from mm/zsmalloc.c~zsmalloc-add-zpool_ops-field-to-zs_pool-to-store-evict-handlers +10 -1
@@ -242,6 +242,8 @@ struct zs_pool {
 #ifdef CONFIG_ZPOOL
 	/* List tracking the zspages in LRU order by most recently added object */
 	struct list_head lru;
+	struct zpool *zpool;
+	const struct zpool_ops *zpool_ops;
 #endif
 
 #ifdef CONFIG_ZSMALLOC_STAT
@@ -382,7 +384,14 @@ static void *zs_zpool_create(const char
 	 * different contexts and its caller must provide a valid
 	 * gfp mask.
 	 */
-	return zs_create_pool(name);
+	struct zs_pool *pool = zs_create_pool(name);
+
+	if (pool) {
+		pool->zpool = zpool;
+		pool->zpool_ops = zpool_ops;
+	}
+
+	return pool;
 }
 
 static void zs_zpool_destroy(void *pool)

_

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