From: Mike Rapoport <rppt@kernel.org>
To: nakixii <nakixii@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
Nhat Pham <nphamcs@gmail.com>, Yosry Ahmed <yosry@kernel.org>,
Minchan Kim <minchan@kernel.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Barry Song <baohua@kernel.org>, Hugh Dickins <hughd@google.com>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Peter Xu <peterx@redhat.com>,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [RFC PATCH 00/16] mm: add in-memory compression of reclaimed pages
Date: Mon, 16 Nov 2026 13:14:16 +0200 [thread overview]
Message-ID: <avrliOfBi326au6B@kernel.org> (raw)
In-Reply-To: <20261116110122.309748-1-nakixii@gmail.com>
Hi,
On Mon, Nov 16, 2026 at 07:01:06PM +0800, nakixii wrote:
> This is a proof of concept, posted to ask whether the approach is worth
> pursuing. It is not meant for merging. The series is based on Linux
> 6.12.23, not on mm-unstable, and has not been ported to the swap-table
> and zpool changes that have landed since. If there is interest, the
> next version will be rebased onto mm-unstable.
>
> memcomp stores reclaimed anonymous and shmem pages in compressed form
> in memory, using the kernel's compressors and zsmalloc unchanged.
> Reclaim replaces the PTE, or the shmem page-cache entry, with a
> swap-like token that names a 16-byte slot. A fault on the token
> decompresses the page and maps it again. No block device is needed. If
> swap is configured, cold entries can be written back to it. The sysfs
> interface is under /sys/kernel/mm/memcomp.
>
> Results
> =======
>
> The comparison ran 965 fresh guest boots on real application pages,
> under nested KVM on WSL2, with a paired rule fixed before collection.
> Selected results:
>
> Without real swap, single-page refault p99 was 10.7 us against 20.7 us
> for zram with lz4, and 22.0 us against 27.3 us with zstd. Under
> 512 MiB of anonymous pressure, refault p99 was 37% lower than zram
> with lz4 and 36% lower than zswap.
> Completed-switch p99 with zstd was 33-36% lower than zram in 10/10
> rounds and 20-22% lower than zswap in 9/10; these differences were
> smaller than the reference's variation between rounds.
> After writeback, readback p50 over an 832 MiB target was 11.9 us
> against 105.5 us for zswap and 114.0 us for zram writeback, with
> 70-76% fewer bytes written before readback; p99 was about the same.
>
> Less favorable:
>
> With real swap, single-page refault p99 was 4.8 times zram with lz4
> and about 1.5 times zram and zswap with zstd.
> Sequential refault was 30-31% slower than zswap, since there is no
> swap readahead. Single-page pageout p99 was 35-38% slower than zswap.
> In the pageout and refault workload, 64 MiB of real pages per
> application, memcomp used 5-8% more memory than zram; this leaves
> out zram's disksize-sized table, which was larger than the difference.
>
> nakixii (16):
> mm: userfaultfd: check the exclusivity of the page being moved
> mm: add a swap entry type for in-memory compressed pages
> mm: memcomp: compress reclaimed anonymous pages in memory
> mm: userfaultfd: let UFFDIO_MOVE move memcomp entries
> mm: memcomp: charge compressed pages to the source memcg
> mm: memcomp: store shmem and tmpfs pages
> mm: memcomp: write cold pages back to swap
> mm: memcomp: compress foreground batches asynchronously
> mm: memcomp: batch unmap reserved large folios
> mm: memcomp: queue restored large folios for splitting
> mm: memcomp: account user eviction and refault
> mm: memcomp: report precise token residency
> mm: memcomp: add KUnit tests
> selftests/mm: add a memcomp pageout and refault test
> mm: memcomp: add the design doc
> mm: memcomp: add the admin guide
>
> .../ABI/testing/sysfs-kernel-mm-memcomp | 363 +
> .../admin-guide/kernel-parameters.txt | 10 +
> Documentation/admin-guide/mm/index.rst | 1 +
> Documentation/admin-guide/mm/memcomp.rst | 149 +
> Documentation/mm/index.rst | 1 +
> Documentation/mm/memcomp.rst | 215 +
> MAINTAINERS | 12 +
> fs/proc/task_mmu.c | 20 +
> include/linux/memcomp.h | 481 ++
> include/linux/memcontrol.h | 45 +
> include/linux/swap.h | 52 +-
> include/linux/swapops.h | 22 +
> mm/Kconfig | 75 +
> mm/Makefile | 1 +
> mm/hmm.c | 3 +
> mm/huge_memory.c | 44 +
> mm/internal.h | 84 +
> mm/madvise.c | 10 +-
> mm/memcomp.c | 6181 +++++++++++++++++
... (a lot of memcomp/ +++ changes)
> mm/memcontrol.c | 99 +
> mm/memory.c | 42 +-
> mm/migrate.c | 11 +-
> mm/mincore.c | 125 +-
> mm/page_io.c | 42 +
> mm/rmap.c | 41 +-
> mm/shmem.c | 251 +
> mm/swap.h | 4 +
> mm/swap_state.c | 5 +
> mm/swapfile.c | 49 +
> mm/userfaultfd.c | 94 +-
> mm/vmscan.c | 651 +-
> mm/workingset.c | 32 +
> tools/testing/selftests/mm/Makefile | 9 +-
> tools/testing/selftests/mm/config | 11 +
> tools/testing/selftests/mm/hmm-tests.c | 112 +
> tools/testing/selftests/mm/memcomp.c | 831 +++
> 134 files changed, 46825 insertions(+), 14 deletions(-)
This seems to big of a change and the wall of text in your "results"
section does not explain clearly why would we want to bother reading this.
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-11-16 11:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 11:01 [RFC PATCH 00/16] mm: add in-memory compression of reclaimed pages nakixii
2026-11-16 11:01 ` [RFC PATCH 01/16] mm: userfaultfd: check the exclusivity of the page being moved nakixii
2026-11-16 11:01 ` [RFC PATCH 02/16] mm: add a swap entry type for in-memory compressed pages nakixii
2026-11-16 11:01 ` [RFC PATCH 03/16] mm: memcomp: compress reclaimed anonymous pages in memory nakixii
2026-11-16 11:01 ` [RFC PATCH 04/16] mm: userfaultfd: let UFFDIO_MOVE move memcomp entries nakixii
2026-11-16 11:01 ` [RFC PATCH 05/16] mm: memcomp: charge compressed pages to the source memcg nakixii
2026-11-16 11:01 ` [RFC PATCH 06/16] mm: memcomp: store shmem and tmpfs pages nakixii
2026-11-16 11:01 ` [RFC PATCH 07/16] mm: memcomp: write cold pages back to swap nakixii
2026-11-16 11:01 ` [RFC PATCH 08/16] mm: memcomp: compress foreground batches asynchronously nakixii
2026-11-16 11:01 ` [RFC PATCH 09/16] mm: memcomp: batch unmap reserved large folios nakixii
2026-11-16 11:01 ` [RFC PATCH 10/16] mm: memcomp: queue restored large folios for splitting nakixii
2026-11-16 11:01 ` [RFC PATCH 11/16] mm: memcomp: account user eviction and refault nakixii
2026-11-16 11:01 ` [RFC PATCH 12/16] mm: memcomp: report precise token residency nakixii
2026-11-16 11:01 ` [RFC PATCH 13/16] mm: memcomp: add KUnit tests nakixii
2026-11-16 11:01 ` [RFC PATCH 14/16] selftests/mm: add a memcomp pageout and refault test nakixii
2026-11-16 11:01 ` [RFC PATCH 15/16] mm: memcomp: add the design doc nakixii
2026-11-16 11:01 ` [RFC PATCH 16/16] mm: memcomp: add the admin guide nakixii
2026-11-16 11:14 ` Mike Rapoport [this message]
2026-11-17 16:07 ` [RFC PATCH 00/16] mm: add in-memory compression of reclaimed pages nakixii
2026-11-16 14:13 ` Nhat Pham
2026-11-17 16:10 ` nakixii
2026-11-17 22:57 ` Nhat Pham
2026-11-17 16:27 ` Kairui Song
2026-11-17 19:10 ` nakixii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avrliOfBi326au6B@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chrisl@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=nakixii@gmail.com \
--cc=nphamcs@gmail.com \
--cc=peterx@redhat.com \
--cc=roman.gushchin@linux.dev \
--cc=senozhatsky@chromium.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=yosry@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.