lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1690836010.git.quic_sudaraja@quicinc.com>
Date:   Tue,  1 Aug 2023 13:47:12 -0700
From:   Sudarshan Rajagopalan <quic_sudaraja@...cinc.com>
To:     "T . J . Alumbaugh" <talumbau@...gle.com>,
        David Hildenbrand <david@...hat.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Mike Rapoport <rppt@...nel.org>,
        Oscar Salvador <osalvador@...e.de>,
        Anshuman Khandual <anshuman.khandual@....com>,
        "mark . rutland @ arm . com" <mark.rutland@....com>,
        "will @ kernel . org" <will@...nel.org>,
        "virtualization @ lists . linux-foundation . org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-mm @ kvack . org" <linux-mm@...ck.org>,
        "linux-kernel @ vger . kernel . org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel @ lists . infradead . org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-arm-msm @ vger . kernel . org" <linux-arm-msm@...r.kernel.org>
Cc:     Sudarshan Rajagopalan <quic_sudaraja@...cinc.com>,
        Trilok Soni <quic_tsoni@...cinc.com>,
        Sukadev Bhattiprolu <quic_sukadev@...cinc.com>,
        Srivatsa Vaddagiri <quic_svaddagi@...cinc.com>,
        Patrick Daly <quic_pdaly@...cinc.com>,
        Elliot Berman <quic_eberman@...cinc.com>
Subject: [RFC PATCH 0/2] vmrd: dynamic guest VM memory resizing daemon

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ