v2
2026-07-31
用固定池索引缩小zswap_entry · v2
zswap 用固定 16 槽数组和 u8 槽位索引替代每 entry 的 pool 指针,entry 从 56 字节降至 48 字节。
原始补丁链接
子 Patch(2)
1/2
mm/zswap: replace the zswap_pools list with a fixed pools array
Originally zswap holds its pools on an RCU list whose head also serves as the “current pool”. Only a handful of pools are ever live at once, since a new pool is only created when the compressor is (r
2/2
mm/zswap: reference the pool by index to shrink struct zswap_entry
struct zswap_entry is one allocation per stored page, so its size is pure overhead. It currently embeds an 8-byte pool pointer, even though the live pools now sit in a small fixed array indexed by a