From: Sourav Panda <souravpanda@google.com>
To: mathieu.desnoyers@efficios.com, willy@infradead.org,
david@redhat.com, pasha.tatashin@soleen.com,
rientjes@google.com, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
weixugc@google.com, gthelen@google.com, souravpanda@google.com,
surenb@google.com
Subject: [RFC PATCH 1/6] mm: introduce SELECTIVE_KSM KConfig
Date: Fri, 21 Mar 2025 17:37:24 +0000 [thread overview]
Message-ID: <20250321173729.3175898-2-souravpanda@google.com> (raw)
In-Reply-To: <20250321173729.3175898-1-souravpanda@google.com>
Gate the partitioned and synchronous features of SELECTIVE_KSM behind
a KConfig. This shall prevent vanilla KSM's background thread from
stepping over SELECTIVE_KSM.
Signed-off-by: Sourav Panda <souravpanda@google.com>
---
mm/Kconfig | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/mm/Kconfig b/mm/Kconfig
index 1b501db06417..f9873002414c 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -783,6 +783,17 @@ config KSM
until a program has madvised that an area is MADV_MERGEABLE, and
root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set).
+config SELECTIVE_KSM
+ bool "Enable Selective KSM for page merging"
+ depends on KSM
+ help
+ Enable Synchronous and Partitioned KSM for page merging. There is
+ no background scanning. Instead, userspace specifies the pid
+ and address range to have merged. The partitioning aspect divides
+ the merge space into security domains. Merging of pages only takes
+ place within a partition, improving security. Furthermore, trees
+ in each partitioning becomes smaller, improving CPU efficiency.
+
config DEFAULT_MMAP_MIN_ADDR
int "Low address space to protect from user allocation"
depends on MMU
--
2.49.0.395.g12beb8f557-goog
next prev parent reply other threads:[~2025-03-21 17:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 17:37 [RFC PATCH 0/6] Selective KSM: Synchronous and Partitioned Merging Sourav Panda
2025-03-21 17:37 ` Sourav Panda [this message]
2025-03-21 17:37 ` [RFC PATCH 2/6] mm: make Selective KSM synchronous Sourav Panda
2025-03-21 17:37 ` [RFC PATCH 3/6] mm: make Selective KSM partitioned Sourav Panda
2025-03-21 17:37 ` [RFC PATCH 4/6] mm: create dedicated trees for SELECTIVE KSM partitions Sourav Panda
2025-03-21 17:37 ` [RFC PATCH 5/6] mm: trigger unmerge and remove SELECTIVE KSM partition Sourav Panda
2025-03-21 17:37 ` [RFC PATCH 6/6] mm: syscall alternative for SELECTIVE_KSM Sourav Panda
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=20250321173729.3175898-2-souravpanda@google.com \
--to=souravpanda@google.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=gthelen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=pasha.tatashin@soleen.com \
--cc=rientjes@google.com \
--cc=surenb@google.com \
--cc=weixugc@google.com \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox