public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv1 0/8] zram: introduce multi-handle entries
@ 2024-11-19  7:20 Sergey Senozhatsky
  2024-11-19  7:20 ` [PATCHv1 1/8] zram: cond_resched() in writeback loop Sergey Senozhatsky
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Sergey Senozhatsky @ 2024-11-19  7:20 UTC (permalink / raw)
  To: Andrew Morton, Minchan Kim; +Cc: linux-kernel, Sergey Senozhatsky

	ZRAM_HUGE objects are incompressible and each takes a whole
physical page on the zsmalloc side.  zsmalloc pool, naturally, has
some internal memory fragmentation (within size-classes), so what
we can do for ZRAM_HUGE objects is to split them into several
smaller objects (2 at this point) and store those parts individually
in regular size-classes (hence multi-handle entries). This, basically,
lets us to use already allocated (but unused) zspages memory for
ZRAM_HUGE objects, instead of unconditional allocation of 0-order
page for each ZRAM_HUGE object.

v1:
-- reworked ZRAM_SAME patch (added missing slot lock guard for slot
   flags operation, added missing .pages_stored bump, factored out
   into a separate function)
-- renamed mhandle defines and added mhandle tail len define
-- fixed some typos

Sergey Senozhatsky (8):
  zram: cond_resched() in writeback loop
  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 ZRAM_HUGE read
  zsmalloc: move ZS_HANDLE_SIZE to zsmalloc header
  zram: introduce multi-handle entries

 drivers/block/zram/zram_drv.c | 368 ++++++++++++++++++++++------------
 drivers/block/zram/zram_drv.h |  12 +-
 include/linux/zsmalloc.h      |   2 +
 mm/zsmalloc.c                 |   2 -
 4 files changed, 249 insertions(+), 135 deletions(-)

-- 
2.47.0.371.ga323438b13-goog


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

end of thread, other threads:[~2024-11-19  9:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19  7:20 [PATCHv1 0/8] zram: introduce multi-handle entries Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 1/8] zram: cond_resched() in writeback loop Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 2/8] zram: free slot memory early during write Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 3/8] zram: remove entry element member Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 4/8] zram: factor out ZRAM_SAME write Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 5/8] zram: factor out ZRAM_HUGE write Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 6/8] zram: factor out ZRAM_HUGE read Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 7/8] zsmalloc: move ZS_HANDLE_SIZE to zsmalloc header Sergey Senozhatsky
2024-11-19  7:20 ` [PATCHv1 8/8] zram: introduce multi-handle entries Sergey Senozhatsky
2024-11-19  9:20 ` [PATCHv1 0/8] " Sergey Senozhatsky

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