From: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
To: "T . J . Alumbaugh" <talumbau@google.com>,
David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Suren Baghdasaryan <surenb@google.com>,
Mike Rapoport <rppt@kernel.org>,
Oscar Salvador <osalvador@suse.de>,
Anshuman Khandual <anshuman.khandual@arm.com>,
"mark . rutland @ arm . com" <mark.rutland@arm.com>,
"will @ kernel . org" <will@kernel.org>,
"virtualization @ lists . linux-foundation . org"
<virtualization@lists.linux-foundation.org>,
"linux-mm @ kvack . org" <linux-mm@kvack.org>,
"linux-kernel @ vger . kernel . org"
<linux-kernel@vger.kernel.org>,
"linux-arm-kernel @ lists . infradead . org"
<linux-arm-kernel@lists.infradead.org>,
"linux-arm-msm @ vger . kernel . org"
<linux-arm-msm@vger.kernel.org>
Cc: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>,
Trilok Soni <quic_tsoni@quicinc.com>,
Sukadev Bhattiprolu <quic_sukadev@quicinc.com>,
Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>,
Patrick Daly <quic_pdaly@quicinc.com>,
Elliot Berman <quic_eberman@quicinc.com>
Subject: [RFC PATCH 0/2] vmrd: dynamic guest VM memory resizing daemon
Date: Tue, 1 Aug 2023 13:47:12 -0700 [thread overview]
Message-ID: <cover.1690836010.git.quic_sudaraja@quicinc.com> (raw)
VM Memory Resizing Daemon (vmrd)
Initial idea of dynamic memory resizing for guest VMs was discussed here
in this thread below as a RFC.
https://lore.kernel.org/linux-arm-kernel/1bf30145-22a5-cc46-e583-25053460b105@redhat.com/T/
Posting the source-code for this userspace daemon written in native C++ as RFC
on such an approach for resizing the VM. We will be merging this into Github or
CodeLinaro after gathering all the review comments. The userspace daemon
registers to Linux kernel's PSI mechanism and it should work on any systems
running Linux with CONFIG_PSI enabled.
This daemon adds memory to guest VM when demand for memory increases,
and tracks for memory pressure going down as the usecase ends and frees
memory to release memory back to host proactively. virtio-mem is used
as interface for adding/removing memory in the guest VM.
More details on the detail and implementation in patch commit text and
RFC discuss thread mentioned above.
PATCH 2 shows the vendor specific implementation by Qualcomm on the memory
plugin interfaces for adding/removing memory to VM by using modified virtio-mem
driver, which uses mem-buf driver for communication between the VMs.
More details on PATCH 2.
This vendor specific implementation is shown just as a reference and different
user/vendor can have their own implementation.
We also intend to make these memory plugin interfaces generic so that we have an
upstream-friendly mechanism for lending memory from the host to guest VMs.
This is still on the works and wanted to seek upstream community's inputs on how
we can achieve this. This way, vmrd can run on any guest running Linux with
CONFIG_PSI and virtio-mem enabled which will be agnostic to the underlying
Hypervisor.
Qualcomm has been using this daemon into its guest VMs for memory resizing.
This has been currently tested with Gunyah Hypervisor and not on any other
Hypervisor. Currently, the guest VM memory is resized by expanding Movable zone
only, since virtio-mem uses memory hotplug and Movable zone guarantees memory
blocks to be isolated and offlined. Next incremental patches of this feature
will be shared soon where both Normal and Movable zone can be resized, thereby
increasing headroom for both DMA (unmovable) and userspace (movable) memory.
Sudarshan Rajagopalan (2):
vmrd: dynamic guest VM memory resizing daemon
vmrd: add implementation of memory plugin interfaces
Makefile.am | 14 +
vmrd.cpp | 1259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1273 insertions(+)
create mode 100644 Makefile.am
create mode 100644 vmrd.cpp
--
2.7.4
next reply other threads:[~2023-08-01 20:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 20:47 Sudarshan Rajagopalan [this message]
2023-08-01 20:47 ` [RFC PATCH 1/2] " Sudarshan Rajagopalan
2023-08-01 20:47 ` [RFC PATCH 2/2] vmrd: add implementation of memory plugin interfaces Sudarshan Rajagopalan
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=cover.1690836010.git.quic_sudaraja@quicinc.com \
--to=quic_sudaraja@quicinc.com \
--cc=anshuman.khandual@arm.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=osalvador@suse.de \
--cc=quic_eberman@quicinc.com \
--cc=quic_pdaly@quicinc.com \
--cc=quic_sukadev@quicinc.com \
--cc=quic_svaddagi@quicinc.com \
--cc=quic_tsoni@quicinc.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=talumbau@google.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox