mm: zswap: move writeback LRU from zpool to zswap
Status from this message: [merged mm-stable] mm-zswap-simplify-writeback-function.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest7 patches 10 repliesApplied 7/7
- v2 RFC7 patches 28 repliesSuperseded
- v17 patches 9 repliesSuperseded
Changes in v3 from the cover letter
- rebased on commit 414fb1ae68b7 ("mm: zswap: support exclusive loads")
- renamed zswap_shrink to zswap_reclaim_entry (Yosry)
- compacted reclaim entry function dropping tree_entry (Johannes)
- deleted .shrink = NULL from driver-specific patches and re-worded commit messages (Minchan and Johannes)
- fixed some indentations and comments (Johannes)
Patches in v3 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | mm: zswap: add pool shrinking mechanismmm/ | +92 | 8 replies | Applied |
| 2/7 | mm: zswap: remove page reclaim logic from zbudmm/ | +1 | 0 replies | Applied |
| 3/7 | mm: zswap: remove page reclaim logic from z3foldmm/ | +2 | 0 replies | Applied |
| 4/7 | mm: zswap: remove page reclaim logic from zsmallocmm/ | +12 | 0 replies | Applied |
| 5/7 | mm: zswap: remove shrink from zpool interfaceinclude/ mm/ mm/ +3 more | +14 | 0 replies | Applied |
| 6/7 | mm: zswap: simplify writeback functionmm/ | +19 | 1 reply | Applied |
| 7/7 | mm: zswap: remove zswap_headermm/ | +22 | 1 reply | Applied |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Nhat Pham | Yosry Ahmed | Johannes Weiner | Minchan Kim |
|---|---|---|---|---|
| 1/7 | A-b | T-b R-b | A-b | |
| 2/7 | A-b | |||
| 3/7 | A-b | |||
| 4/7 | A-b | T-b | A-b | A-b |
| 5/7 | A-b | R-b | A-b | |
| 6/7 | T-b | A-b | ||
| 7/7 | T-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v3 0/7] mm: zswap: move writeback LRU from zpool to zswap
This series aims to improve the zswap reclaim mechanism by reorganizing the LRU management. In the current implementation, the LRU is maintained within each zpool driver, resulting in duplicated code across the three drivers. The proposed change consists in moving the LRU management from the individual implementations up to the zswap layer.
The primary objective of this refactoring effort is to simplify the codebase. By unifying the reclaim loop and consolidating LRU handling within zswap, we can eliminate redundant code and improve maintainability. Additionally, this change enables the reclamation of stored pages in their actual LRU order. Presently, the zpool drivers link backing pages in an LRU, causing compressed pages with different LRU positions to be written back simultaneously.
The series consists of several patches. The first patch implements the LRU and the reclaim loop in zswap, but it is not used yet because all three driver implementations are marked as zpool_evictable. The following three commits modify each zpool driver to be not zpool_evictable, allowing the use of the reclaim loop in zswap. As the drivers removed their shrink functions, the zpool interface is then trimmed by removing zpool_evictable, zpool_ops, and zpool_shrink. Finally, the code in zswap is further cleaned up by simplifying the writeback function and removing the now unnecessary zswap_header.
Based on mm-stable + commit 414fb1ae68b7("mm: zswap: support exclusive loads") currently in mm-unstable.
V2:
- fixed lru list init/del/del_init (Johannes)
- renamed pool.lock to lru_lock and added lock ordering comment (Yosry)
- trimmed zsmalloc even more (Johannes | Nhat)
- moved ref drop out of writeback function (Johannes)
V3:
- rebased on commit 414fb1ae68b7 ("mm: zswap: support exclusive loads")
- renamed zswap_shrink to zswap_reclaim_entry (Yosry)
- compacted reclaim entry function dropping tree_entry (Johannes)
- deleted .shrink = NULL from driver-specific patches and re-worded commit messages (Minchan and Johannes)
- fixed some indentations and comments (Johannes)
Domenico Cerasuolo (7):
mm: zswap: add pool shrinking mechanism
mm: zswap: remove page reclaim logic from zbud
mm: zswap: remove page reclaim logic from z3fold
mm: zswap: remove page reclaim logic from zsmalloc
mm: zswap: remove shrink from zpool interface
mm: zswap: simplify writeback function
mm: zswap: remove zswap_header
include/linux/zpool.h | 20 +-- mm/z3fold.c | 249 +------------------------- mm/zbud.c | 167 +----------------- mm/zpool.c | 48 +---- mm/zsmalloc.c | 396 ++---------------------------------------- mm/zswap.c | 190 +++++++++++--------- 6 files changed, 134 insertions(+), 936 deletions(-)
Signature · 1 line
2.34.1