[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 0/5] Memory Ballooning Cover Letter



From: Cason Schindler <cason.j.schindler@xxxxxxxxx>

Hello Unikraft developers! This is our work towards
Issue #12, Memory Ballooning in Unikraft, which was
done as a project for our Virtualization class at UT
Austin. This patch contains the work we were able to
complete by the end of the semester. We created a
memory ballooning API in plat/memory.h, which has
inflate and deflate calls. For Xen and KVM, we created
balloon drivers to interface with the memory ballooning
functionality of those hypervisors. We did not implement
a driver for linuxu, but expect it could be done with
mmap/munmap. For the Xen and KVM drivers, we put the
code in their corresponding memory.c files, along with
the inflate and deflate calls. The main reason for this
was due to trouble with includes and makefiles  when 
putting our code in new files. We modified the buddy
allocator to call the ballooning API. We also decided
to use the allocator's existing means of keeping track
of memory and interpreted it as our balloon structure --
so when the allocator allocs, it calls our deflate
function with the page; when it frees it calls our inflate
function with the page. Our reason for using the allocator
to provide the pages, rather than keeping a separate
structure in the driver, was in order to focus on the
communication with the hypervisors in the allotted time.

We were not able to test the functionality thoroughly due
to the inability to configure a proper environment -- we
did not have a way to run Xen, but we did have a way to
run KVM. We know that for KVM, the driver is registered,
the device gets created and handed to the register, and
that the driver fills the virtqueues and notifies KVM.
However, we were unable to verify that the pages transferred
were actually received by KVM and the VM's memory reservation
changed as it should have in accordance with the inflate
and deflate calls. We do know that the allocator successfully
makes calls to transfer all of the free memory to KVM once
the device has been latched to the driver. We followed
the users-gettingstarted file for running Unikraft with our
changes. KVM runs through hello world successfully. We
could not run with Xen, and linuxu was not given memory
ballooning support.

In light of this, here is our work. We hope that it can
be of some use to at least provide a starting point for
the implementation of memory ballooning in Unikraft. Our
main goal for this patch is just to provide you with the
code we wrote so that you have it and can do with it what
you please.

Thank you very much. We really enjoyed working on the
Unikraft project and working with the developers. We see
a bright future for Unikraft!

Sincerely,

Cason Schindler and Jack Raney
The University of Texas at Austin

Cason Schindler (5):
  include/uk/plat: Memory Ballooning API
  plat/xen: Xen Balloon Driver
  plat/kvm: KVM Balloon Driver
  plat/linuxu: Linuxu Ballooning API Unimplemented
  lib/ukallocbbuddy: Allocator Ballooning Use

 include/uk/plat/memory.h                   |  19 +
 lib/ukallocbbuddy/bbuddy.c                 | 104 +++++-
 lib/ukallocbbuddy/include/uk/allocbbuddy.h |   2 +
 plat/kvm/memory.c                          | 390 +++++++++++++++++++++
 plat/linuxu/memory.c                       |  13 +
 plat/xen/memory.c                          |  78 +++++
 6 files changed, 604 insertions(+), 2 deletions(-)

-- 
2.24.0


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.