Re: [Qemu-devel] [RFC PATCH v2 00/35] Initial support of multi-process qemu

2019-06-18 Thread Daniel P . Berrangé
On Mon, Jun 17, 2019 at 11:14:50AM -0700, elena.ufimts...@oracle.com wrote:
> From: Elena Ufimtseva 
> 
> Initial support of multi-process qemu
> 
> Started with the presentation in October 2017 made by
> Marc-Andre (Red Hat) and Konrad Wilk (Oracle)
> (http://events17.linuxfoundation.org/sites/events/files/slides/KVM%20FORUM%20multi-process.pdf,
> https://www.youtube.com/watch?v=Kq1-coHh7lg) and
> continued in the BoF session at the KVM forum in 2018 with Jag leading
> the discussion, the multi-process project is now in the prototype version
> and presented by this patchset.
> 
> The proof of the concept patches were posted on the qemu-devel mailing
> list before the BoF session at the KVM forum and can be found here:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg566538.html
> 
> This series presents the initial support for QEMU that can
> launch some of the devices in the remote processes.
> 
> Thanks to a v1 review and some of the question Stefan and Daniel asked, we
> were able to incorporate your ideas into our goals.
> 
> We would like to present version 2 of the patchset.
> This version has addressed comments made during the review of v1 and includes:
> 
> - support for libvirt fork/exec of remote processes;
>   QEMU is still capable of fork/execing the remote processes unless its 
> disabled
>   by seccomp.
>   When using libvirt, the daemon will spawn remote processes and pass the 
> communication
>   file descriptors to main QEMU process and the remote processes.
>   The libvirt patches are in the making and will be sent out shortly;
> - using existing -device/-drive command line options to specify remote 
> devices with
>   additional suboptons;
> - refractor message sending code;
> - remove specific HMP/QMP commands and use the one that exist now;
> - extend existing QMP commands;
> - added timeout to communication channel;
> 
> Following people contributed to this patchset:
> 
> John G Johnson 
> Jagannathan Raman 
> Elena Ufimtseva 
> Kanth Ghatraju 
> 
> For full concept writeup about QEMU disaggregation refer to
> docs/devel/qemu-multiprocess.txt.
> 
> This series has a limited scope and allows QEMU to launch
> LSI SCSI controller emulation in the separate process and
> execute HMP commands to manipulate the devices.
> This series with appropriate libvirt patches allows to
> launch a guest with remote processes using libvirt.
> (libvirt patches will be posted and will be reflected in the reply to
> this patch).
> 
> Please refer to the docs/qemu-multiprocess.txt for usage
> information.
> 
> his series is based on qemu upstream commit
> 3284aa128153750f14a61e8a96fd085e6f2999b6.
> 
> TODO items:
>   - bus support for remote process (non-default);
>   - live migration;
>   - performance improvements;
>   - support for more devices;
>   - support for seccomp for remote processes;
>   - support for CPU disaggregated emulation;
> 
> We would like to welcome all your ideas, concerns and questions
> for this patchset.

For future versions please make sure the mails sent a fully
threaded, so that all the patches are in-reply-to the cover
letter mail, rather than each scattered as a standalone mail.

The best way todo this is to use the excellent "git-publish"
tool. The added benefit of git-publish is that it will CC
all the subsystem maintainers whose code is touched

  https://github.com/stefanha/git-publish

It is packaged in Debian, Ubuntu, Fedora & EPEL

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



[Qemu-devel] [RFC PATCH v2 00/35] Initial support of multi-process qemu

2019-06-17 Thread elena . ufimtseva
From: Elena Ufimtseva 

Initial support of multi-process qemu

Started with the presentation in October 2017 made by
Marc-Andre (Red Hat) and Konrad Wilk (Oracle)
(http://events17.linuxfoundation.org/sites/events/files/slides/KVM%20FORUM%20multi-process.pdf,
https://www.youtube.com/watch?v=Kq1-coHh7lg) and
continued in the BoF session at the KVM forum in 2018 with Jag leading
the discussion, the multi-process project is now in the prototype version
and presented by this patchset.

The proof of the concept patches were posted on the qemu-devel mailing
list before the BoF session at the KVM forum and can be found here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg566538.html

This series presents the initial support for QEMU that can
launch some of the devices in the remote processes.

Thanks to a v1 review and some of the question Stefan and Daniel asked, we
were able to incorporate your ideas into our goals.

We would like to present version 2 of the patchset.
This version has addressed comments made during the review of v1 and includes:

- support for libvirt fork/exec of remote processes;
  QEMU is still capable of fork/execing the remote processes unless its disabled
  by seccomp.
  When using libvirt, the daemon will spawn remote processes and pass the 
communication
  file descriptors to main QEMU process and the remote processes.
  The libvirt patches are in the making and will be sent out shortly;
- using existing -device/-drive command line options to specify remote devices 
with
  additional suboptons;
- refractor message sending code;
- remove specific HMP/QMP commands and use the one that exist now;
- extend existing QMP commands;
- added timeout to communication channel;

Following people contributed to this patchset:

John G Johnson 
Jagannathan Raman 
Elena Ufimtseva 
Kanth Ghatraju 

For full concept writeup about QEMU disaggregation refer to
docs/devel/qemu-multiprocess.txt.

This series has a limited scope and allows QEMU to launch
LSI SCSI controller emulation in the separate process and
execute HMP commands to manipulate the devices.
This series with appropriate libvirt patches allows to
launch a guest with remote processes using libvirt.
(libvirt patches will be posted and will be reflected in the reply to
this patch).

Please refer to the docs/qemu-multiprocess.txt for usage
information.

his series is based on qemu upstream commit
3284aa128153750f14a61e8a96fd085e6f2999b6.

TODO items:
  - bus support for remote process (non-default);
  - live migration;
  - performance improvements;
  - support for more devices;
  - support for seccomp for remote processes;
  - support for CPU disaggregated emulation;

We would like to welcome all your ideas, concerns and questions
for this patchset.

Thank you!

Elena Ufimtseva (13):
  multi-process: add a command line option for debug file
  multi-process: introduce proxy object
  multi-process: store info about the remote process
  multi-process: configure remote side devices
  multi-process: add qdev_proxy_add to create proxy devices
  multi-process: remote: add setup_devices and setup_drive msg
processing
  multi-process: remote: use fd for socket from parent process
  multi-process: remote: add create_done condition
  multi-process: add processing of remote drive and device command line
  multi-process: add heartbeat timer and signal handler
  multi-process: handle heartbit messages in remote process
  multi-process: add the concept description to
docs/devel/qemu-multiprocess
  multi-process: add configure and usage information

Jagannathan Raman (22):
  multi-process: memory: alloc RAM from file at offset
  multi-process: util: Add qemu_thread_cancel() to cancel running thread
  multi-process: Add stub functions to facilate build of multi-process
  multi-process: Add config option for multi-process QEMU
  multi-process: build system for remote device process
  multi-process: define proxy-link object
  multi-process: add functions to synchronize proxy and remote endpoints
  multi-process: setup PCI host bridge for remote device
  multi-process: setup a machine object for remote device process
  multi-process: setup memory manager for remote device
  multi-process: remote process initialization
  multi-process: PCI BAR write handling for proxy & remote endpoints
  multi-process: PCI BAR read handling for proxy & remote endpoints
  multi-process: Add LSI device proxy object
  multi-process: Synchronize remote memory
  multi-process: create IOHUB object to handle irq
  multi-process: Add QMP & extend HMP commands to list remote info
  multi-process: Extend monitor commands to add a device to remote
process
  multi-process: Extend monitor commands to remove device from remote
process
  multi-process: Extend drive_add to add drive to remote device
  multi-process: Extend drive_del command to delete drive from remote
process
  multi-process: Extend block_resize command to support remote block
device

 Makefile