linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/7] zram: split page type read/write handling
@ 2024-12-18  6:34 Sergey Senozhatsky
  2024-12-18  6:34 ` [PATCHv2 1/7] zram: free slot memory early during write Sergey Senozhatsky
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sergey Senozhatsky @ 2024-12-18  6:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Minchan Kim, linux-mm, linux-kernel, Sergey Senozhatsky

This is a subset of [1] series which contains only fixes and
improvements (no new features, as ZRAM_HUGE split is still
under consideration).

The motivation for factoring out is that zram_write_page()
gets more and more complex all the time, because it tries
to handle too many scenarios: ZRAM_SAME store, ZRAM_HUGE
store, compress page store with zs_malloc allocation slowpath
and conditional recompression, etc.  Factor those out and
make things easier to handle.

Addition of cond_resched() is simply a fix, I can trigger
watchdog from zram writeback().  And early slot free is
just a reasonable thing to do.

[1] https://lore.kernel.org/linux-kernel/20241119072057.3440039-1-senozhatsky@chromium.org

Sergey Senozhatsky (7):
  zram: free slot memory early during write
  zram: remove entry element member
  zram: factor out ZRAM_SAME write
  zram: factor out ZRAM_HUGE write
  zram: factor out different page types read
  zram: use zram_read_from_zspool() in writeback
  zram: cond_resched() in writeback loop

 drivers/block/zram/zram_drv.c | 301 +++++++++++++++++++---------------
 drivers/block/zram/zram_drv.h |   5 +-
 2 files changed, 171 insertions(+), 135 deletions(-)

--
2.47.1.613.gc27f4b7a9f-goog



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-18  6:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-18  6:34 [PATCHv2 0/7] zram: split page type read/write handling Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 1/7] zram: free slot memory early during write Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 2/7] zram: remove entry element member Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 3/7] zram: factor out ZRAM_SAME write Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 4/7] zram: factor out ZRAM_HUGE write Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 5/7] zram: factor out different page types read Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 6/7] zram: use zram_read_from_zspool() in writeback Sergey Senozhatsky
2024-12-18  6:34 ` [PATCHv2 7/7] zram: cond_resched() in writeback loop Sergey Senozhatsky

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