A Zero-Copy Shared Memory Framework for Host-Guest Data Sharing in KVM

Christian Pinto, Baptiste Reynal, Nikolay Nikolaev, Daniel Raho · 2016

Virtualization is a technology pervading various application domains, spanning nowadays from cloud computing to embedded systems. One of the most important features in virtualization is the possibility of data/memory sharing between virtual machines, between the host system, virtual machines. Such capability is as an example extremely important in the para-virtualization of programmable parallel accelerators, such as GPUs, where huge memory buffers are allocated in virtual machines, need to be shared with the actual device in order to be processed. Various techniques enable the communication between the guest, the host, but most of them are designed to exchange small amounts of data, or rely on a socket-based paradigm where a copy of the data is performed between guest, host adding the need for serialization/de-serialization of data at each endpoint. Data copies, serialization/de-serialization are a major source of overhead in virtualization, especially in the embedded domain where lower performance processors are used. This work presents a zero-copy shared memory mechanism for host-guest memory sharing in KVM. The zero-copy framework exploits features of the KVM hypervisor to let a host application map a memory buffer allocated in the guest environment. This feature leads to a zero-overhead communication, thus helps reducing the overall overhead of software based virtualization techniques. This paper will also introduce a use case scenario for the exploitation of the zero-copy framework,, present some preliminary performance results.

Read the paper · More papers on PaperTik