[Top][All Lists]

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

[Qemu-devel] [RFC 0/4] QEMU shared-memory over network

From: Baptiste Reynal
Subject: [Qemu-devel] [RFC 0/4] QEMU shared-memory over network
Date: Thu, 24 Mar 2016 14:16:38 +0100

This patch series is an extension to "[RFC v2 0/6] QEMU shared-memory backend",
and allows two instances of QEMU to share a memory over the network.

Instead of allocating the memory using hugetlbfs, the
memory is allocated as a simple ram pointer, and when
a slave connects a new mmio region is created in the
master main memory so that each access is trapped and
forwarded over the network.

The slave has direct access to its memory (no performance
loss) while master accesses (which are less frequent) go
over a network socket.

To test those patches modules and test application are
available on https://git.virtualopensystems.com/dev/qemu-het-tools.
- SDM Platform module on branch sdm_test_mod_v1
- Test application on branch sdm_test_app
- Slave files on branch demo_slaves_sdm

QEMU code is available here https://git.virtualopensystems.com/dev/qemu on 
branch network-extension-v1.

Run QEMU master instance:
./qemu-system-arm -nographic \
        -kernel zImage \
        -M virt -m 1G \
        -initrd busybox.cpio \
multi-socket-backend,id=sock,listen,host="",port="1234" \
memory-backend-network,id=mem,size=1G,shared-size=512M,socket=sock,master \
        -object sdm-communication-socket,id=scomm,socket=sock \
        -device sdm-platform,comm=scomm,master,num-slaves=2 \
        -append "mem=512M memmap=512M$0x60000000" \
        -numa node,memdev=mem -m 1G

Run QEMU slave instance:
./qemu-system-arm -nographic \
        -M virt,slave \
        -object multi-socket-backend,id=sock,host="",port="1234" \
        -object memory-backend-network,id=mem,size=512M,socket=sock \
        -object sdm-signal-nboot,id=boot,nhm=mem \
        -object sdm-communication-socket,id=scomm,socket=sock \
        -device sdm-platform,comm=scomm,len-signals=1,signals[0]="boot" \
        -incoming "shared:mem" \
        -numa node,memdev=mem -m 512M

On the master, load the SDM module (insmod sdm_test_mod.ko) and trigger the boot
with the following command:
./sdm-test -b 0 1 zImage slave.dtb

zImage and slave.dtb are available on branch demo_slaves_sdm.

This patch serie depends on:
- [RFC v2 0/6] SDM Interface
- [RFC v2 1/1] backend: multi-client-socket

This work has been sponsored by Huawei Technologies Duesseldorf GmbH.

Baptiste Reynal (4):
  backend: multi-client-socket
  backend: shared memory over network backend
  migration: extend shared migration type
  hw/misc: sdm signal nboot

 backends/Makefile.objs             |   2 +-
 backends/hostmem-network.c         | 301 ++++++++++++++++++++++++++
 backends/multi-socket.c            | 420 +++++++++++++++++++++++++------------
 hw/misc/Makefile.objs              |   1 +
 hw/misc/sdm-signal-nboot.c         |  62 ++++++
 include/hw/misc/sdm-signal-nboot.h |  28 +++
 include/qemu/multi-socket.h        |  57 ++++-
 include/sysemu/hostmem-network.h   |  79 +++++++
 migration/shared.c                 |  20 +-
 9 files changed, 823 insertions(+), 147 deletions(-)
 create mode 100644 backends/hostmem-network.c
 create mode 100644 hw/misc/sdm-signal-nboot.c
 create mode 100644 include/hw/misc/sdm-signal-nboot.h
 create mode 100644 include/sysemu/hostmem-network.h


reply via email to

[Prev in Thread] Current Thread [Next in Thread]