Skip to contentSkip to conversation

mm-zswapc-avoid-unnecessary-copy-in-at-map-time.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/zswap.c: avoid unnecessary copy-in at map time
has been removed from the -mm tree. Its filename was
mm-zswapc-avoid-unnecessary-copy-in-at-map-time.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Miaohe Lin <[email protected]>
Subject: mm/zswap.c: avoid unnecessary copy-in at map time

The buf mapped via zpool_map_handle() is only used to store compressed page buffer and there is no information to extract from it. So we could use ZPOOL_MM_WO instead to avoid unnecessary copy-in at map time.

Cc Colin Ian King <[email protected]>
Cc Dan Streetman <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Seth Jennings <[email protected]>
Cc Tian Tao <[email protected]>
Cc Vitaly Wool <[email protected]>

---

 mm/zswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zswap.c renamed from mm/zswap.c~mm-zswapc-avoid-unnecessary-copy-in-at-map-time +1 -1
@@ -1203,7 +1203,7 @@ static int zswap_frontswap_store(unsigne
 		zswap_reject_alloc_fail++;
 		goto put_dstmem;
 	}
-	buf = zpool_map_handle(entry->pool->zpool, handle, ZPOOL_MM_RW);
+	buf = zpool_map_handle(entry->pool->zpool, handle, ZPOOL_MM_WO);
 	memcpy(buf, &zhdr, hlen);
 	memcpy(buf + hlen, dst, dlen);
 	zpool_unmap_handle(entry->pool->zpool, handle);

_

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

mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch