From: David Hildenbrand <david@redhat.com>
To: Sourav Panda <souravpanda@google.com>,
lsf-pc@lists.linux-foundation.org, Linux-MM <linux-mm@kvack.org>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Yu Zhao <yuzhao@google.com>,
shr@devkernel.io, David Rientjes <rientjes@google.com>
Subject: Re: [LSF/MM/BPF TOPIC] KSM Enhancements: Selective KSM
Date: Tue, 4 Feb 2025 10:44:03 +0100 [thread overview]
Message-ID: <aadb7746-6972-498e-b21d-ab9d0df59dd9@redhat.com> (raw)
In-Reply-To: <CANruzcR0oN8URqHh86HLuqfiv=pax0-eQ=3_oCK-kX_cuktUGw@mail.gmail.com>
On 01.02.25 03:15, Sourav Panda wrote:
> Hi,
Hi,
>
>
> KSM is a powerful tool for deduplicating memory, reducing usage by merging
>
> identical pages across processes. However, there are certain interface and
>
> implementation aspect that prevents its deployment in our use case; wherein
>
> security and efficiency (CPU overhead - due to background scanning) are of
>
> greater importance.
>
>
> We propose Selective KSM, a mechanism to control when the merging takes
>
> place and what pages can be merged together. We do this by partitioning the
>
> merge-space as per security-domains and carryout the merging as part of a
>
> synchronous syscall. Doing so, we ensure sensitive-content is not merged
>
> with non-sensitive content.
I'll note that there was an RFC for uKSM [1] last year. Unfortunately, I
didn't have time to look into it in more detail, and there was never any
push for it.
In particular, it proposed an interface:
- /proc/uksm/merge enables the merging of two pages given their process
IDs and addresses.
- /proc/uksm/unmerge allows unmerging a previously merged KSM page.
- /proc/uksm/cmp provides a lightweight mechanism to check page content
equivalence before invoking a merge operation.
[1]
https://lore.kernel.org/linux-mm/20240329104035.62942-1-teawater@antgroup.com/T/
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-02-04 9:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 2:15 Sourav Panda
2025-02-03 2:54 ` David Rientjes
2025-02-03 7:20 ` Sourav Panda
2025-02-04 9:44 ` David Hildenbrand [this message]
2025-02-04 18:21 ` 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=aadb7746-6972-498e-b21d-ab9d0df59dd9@redhat.com \
--to=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=pasha.tatashin@soleen.com \
--cc=rientjes@google.com \
--cc=shr@devkernel.io \
--cc=souravpanda@google.com \
--cc=yuzhao@google.com \
/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