Skip to content

compressed in-memory swapping take3

Nitin Gupta lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xvmalloc memory allocatordrivers/block/xvmalloc.c drivers/block/xvmalloc.h drivers/block/xvmalloc_int.h+677 -00 replies
2/3compressed RAM block devicedrivers/block/Kconfig drivers/block/Makefile drivers/block/ramzswap.c +1 more+1170 -00 replies
3/3ramzswap documentationDocumentation/blockdev/00-INDEX Documentation/blockdev/ramzswap.txt Documentation/kernel-parameters.txt+78 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] compressed in-memory swapping take3

Hi,

Project home: http://code.google.com/p/compcache/

It allows creating a RAM based block device which acts as swap disk. Pages swapped to this device are compressed and stored in memory itself. This is a big win over swapping to slow hard-disk which are typically used as swap disk. For flash, these suffer from wear-leveling issues when used as swap disk - so again its helpful. For swapless systems, it allows more apps to run.

* Changelog: take3 vs take2
xvmalloc changes:
- Use kernel defined macros and constants in xvmalloc and remove equivalent defines for ALIGN, roundup etc.
- Use kernel bitops (set_bit, clear_bit)
- Moved it to drivers/block since its not clear if it has any other user.
ramzswap changes:
- All instances of compcache renamed to ramzswap.
Also renamed module to ramzswap
- Renamed "backing_dev" parameter to "backing_swap"
- Documentation changes to reflect above changes.
- Remove "table index" from object header (4 bytes). This will be needed when memory defragmentation is implemented. So, avoid this (small) overhead for now.

* Changelog: take2 vs initial revision:
xvmalloc changes:
- Use Linux kernel coding style for xvmalloc
- Collapse all individual flag test/set/get to generic {test_set_get}_flag
- Added BLOCK_NEXT() macro to reach next contiguous block
- Other minor cleanups - no functional changes
compcache block device code:
- compcache core changes due to change in xvmalloc interface names

Links to performance numbers, use cases can be found in original thread:
http://lkml.org/lkml/2009/3/17/116

Thanks to Christoph, Pekka and Andrew for feedback on previous revisions.

Thanks,
Nitin