| From: |
| Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com> |
| To: |
| Andrew Morton <akpm-AT-linux-foundation.org> |
| Subject: |
| [RFC PATCH 0/2] SKSM: Synchronous Kernel Samepage Merging |
| Date: |
| Thu, 27 Feb 2025 21:30:41 -0500 |
| Message-ID: |
| <20250228023043.83726-1-mathieu.desnoyers@efficios.com> |
| Cc: |
| linux-kernel-AT-vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>, Linus Torvalds <torvalds-AT-linux-foundation.org>, Matthew Wilcox <willy-AT-infradead.org>, Olivier Dion <odion-AT-efficios.com>, linux-mm-AT-kvack.org |
| Archive-link: |
| Article |
This series introduces SKSM, a new page deduplication ABI,
aiming to fix the limitations inherent to the KSM ABI.
The implementation is simple enough: SKSM is implemented in about 100
LOC compared to 2.5k LOC for KSM (on top of the common KSM helpers).
This is sent as a proof of concept. It applies on top of v6.13.
Feedback is welcome!
Mathieu
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Olivier Dion <odion@efficios.com>
Cc: linux-mm@kvack.org
Mathieu Desnoyers (2):
mm: Introduce SKSM: Synchronous Kernel Samepage Merging
selftests/kskm: Introduce SKSM basic test
include/linux/ksm.h | 4 +
include/linux/mm_types.h | 7 +
include/linux/page-flags.h | 42 ++++
include/linux/sksm.h | 27 +++
include/uapi/asm-generic/mman-common.h | 2 +
mm/Kconfig | 5 +
mm/Makefile | 1 +
mm/ksm-common.h | 228 ++++++++++++++++++++++
mm/ksm.c | 219 +--------------------
mm/madvise.c | 6 +
mm/memory.c | 2 +
mm/page_alloc.c | 3 +
mm/sksm.c | 190 ++++++++++++++++++
tools/testing/selftests/sksm/.gitignore | 2 +
tools/testing/selftests/sksm/Makefile | 14 ++
tools/testing/selftests/sksm/basic_test.c | 217 ++++++++++++++++++++
16 files changed, 751 insertions(+), 218 deletions(-)
create mode 100644 include/linux/sksm.h
create mode 100644 mm/ksm-common.h
create mode 100644 mm/sksm.c
create mode 100644 tools/testing/selftests/sksm/.gitignore
create mode 100644 tools/testing/selftests/sksm/Makefile
create mode 100644 tools/testing/selftests/sksm/basic_test.c
--
2.39.5