linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [RFC PATCH v2 0/7] mm: zswap: move writeback LRU from zpool to zswap
           [not found] <20230606145611.704392-1-cerasuolodomenico@gmail.com>
           [not found] ` <20230606145611.704392-2-cerasuolodomenico@gmail.com>
    @ 2023-06-07  9:16 ` Yosry Ahmed
      2023-06-07  9:23   ` Domenico Cerasuolo
           [not found] ` <20230606145611.704392-7-cerasuolodomenico@gmail.com>
                       ` (5 subsequent siblings)
      7 siblings, 1 reply; 28+ messages in thread
    From: Yosry Ahmed @ 2023-06-07  9:16 UTC (permalink / raw)
      To: Domenico Cerasuolo
      Cc: vitaly.wool, minchan, senozhatsky, linux-mm, ddstreet, sjenning,
    	nphamcs, hannes, akpm, linux-kernel, kernel-team
    
    On Tue, Jun 6, 2023 at 7:56 AM Domenico Cerasuolo
    <cerasuolodomenico@gmail.com> wrote:
    >
    > 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 399ab221f3ff
    > ("mm: zswap: shrink until can accept") currently in mm-unstable.
    
    I tested this + commit fe1d1f7d0fb5 ("mm: zswap: support exclusive
    loads") currently in mm-unstable, using zsmalloc and
    CONFIG_ZSWAP_EXCLUSIVE_LOADS=y. I only ran basic zswap tests with
    manual writeback induction and made sure everything is sane. I
    obviously hope you did more involved testing :)
    
    The only problem I came across is the conflict with fe1d1f7d0fb5, and
    I suggested the fix in patch 1. With the fix, everything seems
    correct.
    
    So I guess, FWIW for all the patches except 2 & 3 (for zbud and z3fold):
    Tested-by: Yosry Ahmed <yosryahmed@google.com>
    
    >
    > 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)
    >
    > 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 |  19 +-
    >  mm/z3fold.c           | 249 +-------------------------
    >  mm/zbud.c             | 167 +-----------------
    >  mm/zpool.c            |  48 +----
    >  mm/zsmalloc.c         | 396 ++----------------------------------------
    >  mm/zswap.c            | 186 +++++++++++---------
    >  6 files changed, 130 insertions(+), 935 deletions(-)
    >
    > --
    > 2.34.1
    >
    
    
    ^ permalink raw reply	[flat|nested] 28+ messages in thread
  • [parent not found: <20230606145611.704392-7-cerasuolodomenico@gmail.com>]
  • [parent not found: <20230606145611.704392-8-cerasuolodomenico@gmail.com>]
  • [parent not found: <20230606145611.704392-5-cerasuolodomenico@gmail.com>]
  • [parent not found: <20230606145611.704392-3-cerasuolodomenico@gmail.com>]
  • [parent not found: <20230606145611.704392-4-cerasuolodomenico@gmail.com>]
  • [parent not found: <20230606145611.704392-6-cerasuolodomenico@gmail.com>]

  • end of thread, other threads:[~2023-06-09 17:14 UTC | newest]
    
    Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <20230606145611.704392-1-cerasuolodomenico@gmail.com>
         [not found] ` <20230606145611.704392-2-cerasuolodomenico@gmail.com>
    2023-06-07  8:14   ` [RFC PATCH v2 1/7] mm: zswap: add pool shrinking mechanism Yosry Ahmed
    2023-06-07  9:22     ` Domenico Cerasuolo
    2023-06-07  9:31       ` Yosry Ahmed
    2023-06-07 21:39   ` Nhat Pham
    2023-06-08 15:58   ` Johannes Weiner
    2023-06-08 16:52   ` Johannes Weiner
    2023-06-08 17:04     ` Johannes Weiner
    2023-06-08 18:45       ` Johannes Weiner
    2023-06-09  8:39         ` Domenico Cerasuolo
    2023-06-07  9:16 ` [RFC PATCH v2 0/7] mm: zswap: move writeback LRU from zpool to zswap Yosry Ahmed
    2023-06-07  9:23   ` Domenico Cerasuolo
    2023-06-07  9:32     ` Yosry Ahmed
         [not found] ` <20230606145611.704392-7-cerasuolodomenico@gmail.com>
    2023-06-07  9:26   ` [RFC PATCH v2 6/7] mm: zswap: simplify writeback function Yosry Ahmed
    2023-06-09 10:23     ` Domenico Cerasuolo
    2023-06-09 11:01       ` Yosry Ahmed
    2023-06-08 16:48   ` Johannes Weiner
    2023-06-09 11:05     ` Domenico Cerasuolo
         [not found] ` <20230606145611.704392-8-cerasuolodomenico@gmail.com>
    2023-06-07  9:30   ` [RFC PATCH v2 7/7] mm: zswap: remove zswap_header Yosry Ahmed
    2023-06-09 16:10     ` Domenico Cerasuolo
    2023-06-09 17:13       ` Yosry Ahmed
         [not found] ` <20230606145611.704392-5-cerasuolodomenico@gmail.com>
    2023-06-07 17:23   ` [RFC PATCH v2 4/7] mm: zswap: remove page reclaim logic from zsmalloc Nhat Pham
    2023-06-07 17:45   ` Minchan Kim
    2023-06-08 16:07   ` Johannes Weiner
         [not found] ` <20230606145611.704392-3-cerasuolodomenico@gmail.com>
    2023-06-08 16:02   ` [RFC PATCH v2 2/7] mm: zswap: remove page reclaim logic from zbud Johannes Weiner
         [not found] ` <20230606145611.704392-4-cerasuolodomenico@gmail.com>
    2023-06-08 16:05   ` [RFC PATCH v2 3/7] mm: zswap: remove page reclaim logic from z3fold Johannes Weiner
         [not found] ` <20230606145611.704392-6-cerasuolodomenico@gmail.com>
    2023-06-07  9:19   ` [RFC PATCH v2 5/7] mm: zswap: remove shrink from zpool interface Yosry Ahmed
    2023-06-08 16:10   ` Johannes Weiner
    2023-06-08 17:51   ` Nhat Pham
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox