v3
2026-08-15
用固定池索引缩小zswap_entry · v3
用固定池数组和索引替代链表与池指针,缩小每页 zswap_entry 结构开销。
原始补丁链接
子 Patch(3)
1/3
mm/zswap: release retired pools via call_rcu() instead of synchronize_rcu()
[mm/zswap: release retired pools via call_rcu() instead of synchronize_rcu()] When a pool’s last reference is dropped, __zswap_pool_empty() removes it from the pool list and schedules __zswap_pool_rel
2/3
mm/zswap: replace the zswap_pools list with a fixed pools array
[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 a
3/3
mm/zswap: reference the pool by index to shrink struct zswap_entry
[mm/zswap: reference the pool by index to shrink struct zswap_entry] struct zswap_entry is allocated once per stored page, so any reduction in its size is multiplied across every entry zswap holds. I