Skip to content

stop anon reclaim when zram is full

Minchan Kim linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5zram: generalize swap_slot_free_notifyDocumentation/filesystems/Locking drivers/block/zram/zram_drv.c include/linux/blkdev.h +2 more+29 -122 replies
2/5mm: add full variable in swap_info_structinclude/linux/swap.h mm/swapfile.c+20 -144 replies
3/5mm: VM can be aware of zram fullnessinclude/linux/blkdev.h mm/swapfile.c+39 -63 replies
4/5zram: add swap full hintdrivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h+57 -412 replies
5/5zram: add fullness knob to control swap fullDocumentation/ABI/testing/sysfs-block-zram drivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h+48 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/5] stop anon reclaim when zram is full

For zram-swap, there is size gap between virtual disksize and available physical memory size for zram so that VM can try to reclaim anonymous pages even though zram is full. It makes system alomost hang(ie, unresponsible) easily in my kernel build test(ie, 1G DRAM, CPU 12, 4G zram swap, 50M zram limit). VM should have killed someone.

This patch adds new hint SWAP_FULL so VM can ask fullness to zram and if it founds zram is full, VM doesn't reclaim anonymous pages until zram-swap gets new free space.

With this patch, I see OOM when zram-swap is full instead of hang with no response.

Minchan Kim (5):
zram: generalize swap_slot_free_notify
mm: add full variable in swap_info_struct
mm: VM can be aware of zram fullness
zram: add swap full hint
zram: add fullness knob to control swap full

 Documentation/ABI/testing/sysfs-block-zram |  10 +++
 Documentation/filesystems/Locking          |   4 +-
 drivers/block/zram/zram_drv.c              | 114 +++++++++++++++++++++++++++--
 drivers/block/zram/zram_drv.h              |   2 +
 include/linux/blkdev.h                     |   8 +-
 include/linux/swap.h                       |   1 +
 mm/page_io.c                               |   6 +-
 mm/swapfile.c                              |  77 ++++++++++++++-----
 8 files changed, 189 insertions(+), 33 deletions(-)
Signature · 7 lines
2.0.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>