Project Description

zswap [1] is a linux kernel component that provides in-memory compression for swap pages. It already provides a limited form of deduplication: if a page is filled with the same value (e.g. all-zeroes) then only that value is kept instead of compressing the contents.

This project proposes to enhance zswap with a more general and powerful dedup capability: pages that contain the same content (as identified by a checksum or hash value across the entire page contents) will be stored only once in the compressed pool.

This would be somewhat similar in spirit to what ksm [2] does, that is consolidation of identical pages of anonymous memory. There are some differences though, primarily ksm requires userspace to explicitly opt-in (via madvise/MADV_MERGEABLE) and operates on active pages that have not been selected for eviction from memory. On the other hand zswap operates transparently from the applications (it applies to all pages of anonymous memory that are on their way to swap).

Goal for this Hackweek

Have a first working POC.

Resources

  • [1] https://www.kernel.org/doc/html/latest/admin-guide/mm/zswap.html
  • [2] https://www.kernel.org/doc/html/latest/admin-guide/mm/ksm.html

Looking for hackers with the skills:

kernel

This project is part of:

Hack Week 21

Activity

  • over 2 years ago: ailiopoulos liked this project.
  • over 2 years ago: dmdiss liked this project.
  • over 2 years ago: shunghsiyu liked this project.
  • over 2 years ago: ailiopoulos added keyword "kernel" to this project.
  • over 2 years ago: mbrugger liked this project.
  • over 2 years ago: ailiopoulos started this project.
  • over 2 years ago: ailiopoulos originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Kill DMA and DMA32 memory zones by ptesarik

    Description

    Provide a better allocator for DMA-capable buffers, making the DMA and DMA32 zones obsolete.

    Goals

    Make a PoC kernel which can boot a x86 VM and a Raspberry Pi (because early RPi4 boards have some of the weirdest DMA constraints).

    Resources

    • LPC2024 talk:
    • video:


    Improve various phones kernel mainline support (Qualcomm, Exynos, MediaTek) by pvorel

    Similar to previous hackweeks ( https://hackweek.opensuse.org/projects/improve-qualcomm-soc-msm8994-slash-msm8992-kernel-mainline-support, https://hackweek.opensuse.org/projects/test-mainline-kernel-on-an-older-qualcomm-soc-msm89xx-explore-mainline-kernel-qualcomm-mainlining) try to improve kernel mainline support of various phones.


    Modernize ocfs2 by goldwynr

    Ocfs2 has gone into a stage of neglect and disrepair. Modernize the code to generate enough interest.

    Goals: * Change the mount sequence to use fscontext * Move from using bufferhead to bio/folios * Use iomap * Run it through xfstests


    Improve UML page fault handler by ptesarik

    Description

    Improve UML handling of segmentation faults in kernel mode. Although such page faults are generally caused by a kernel bug, it is annoying if they cause an infinite loop, or panic the kernel. More importantly, a robust implementation allows to write KUnit tests for various guard pages, preventing potential kernel self-protection regressions.

    Goals

    Convert the UML page fault handler to use oops_* helpers, go through a few review rounds and finally get my patch series merged in 6.14.

    Resources

    Wrong initial attempt: https://lore.kernel.org/lkml/20231215121431.680-1-petrtesarik@huaweicloud.com/T/


    Create a DRM driver for VGA video cards by tdz

    Yes, those VGA video cards. The goal of this project is to implement a DRM graphics driver for such devices. While actual hardware is hard to obtain or even run today, qemu emulates VGA output.

    VGA has a number of limitations, which make this project interesting.

    • There are only 640x480 pixels (or less) on the screen. That resolution is also a soft lower limit imposed by DRM. It's mostly a problem for desktop environments though.
    • Desktop environments assume 16 million colors, but there are only 16 colors with VGA. VGA's 256 color palette is not available at 640x480. We can choose those 16 colors freely. The interesting part is how to choose them. We have to build a palette for the displayed frame and map each color to one of the palette's 16 entries. This is called dithering, and VGA's limitations are a good opportunity to learn about dithering algorithms.
    • VGA has an interesting memory layout. Most graphics devices use linear framebuffers, which store the pixels byte by byte. VGA uses 4 bitplanes instead. Plane 0 holds all bits 0 of all pixels. Plane 1 holds all bits 1 of all pixels, and so on.

    The driver will probably not be useful to many people. But, if finished, it can serve as test environment for low-level hardware. There's some interest in supporting old Amiga and Atari framebuffers in DRM. Those systems have similar limitations as VGA, but are harder to obtain and test with. With qemu, the VGA driver could fill this gap.

    Apart from the Wikipedia entry, good resources on VGA are at osdev.net and FreeVGA