From: Kevin Wolf <kwolf@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: elena.ufimtseva@oracle.com, john.g.johnson@oracle.com,
jag.raman@oracle.com, quintela@redhat.com, mst@redhat.com,
konrad.wilk@oracle.com, qemu-devel@nongnu.org,
dgilbert@redhat.com, ross.lagerwall@citrix.com,
liran.alon@oracle.com, stefanha@redhat.com, afaerber@suse.de,
pbonzini@redhat.com, fam@euphon.net, mreitz@redhat.com,
kanth.ghatraju@oracle.com
Subject: Re: [Qemu-devel] [RFC PATCH v2 06/35] multi-process: build system for remote device process
Date: Tue, 18 Jun 2019 09:11:56 +0200 [thread overview]
Message-ID: <20190618071156.GA4296@localhost.localdomain> (raw)
In-Reply-To: <20190618062406.m67ytpr3fjpxhlbo@sirius.home.kraxel.org>
Am 18.06.2019 um 08:24 hat Gerd Hoffmann geschrieben:
> Hi,
>
> > +#########################################################
> > +# remote-pci-obj-y is common code used by remote devices
> > +
> > +remote-pci-obj-$(CONFIG_MPQEMU) += hw/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += qom/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += backends/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += block/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += migration/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += remote/
> > +
> > +remote-pci-obj-$(CONFIG_MPQEMU) += cpus-common.o
> > +remote-pci-obj-$(CONFIG_MPQEMU) += dma-helpers.o
> > +remote-pci-obj-$(CONFIG_MPQEMU) += blockdev.o
> > +remote-pci-obj-$(CONFIG_MPQEMU) += qdev-monitor.o
> > +remote-pci-obj-$(CONFIG_MPQEMU) += bootdevice.o
> > +remote-pci-obj-$(CONFIG_MPQEMU) += iothread.o
>
> > +all-remote-pci-obj-y += $(authz-obj-y)
> > +all-remote-pci-obj-y += $(block-obj-y)
> > +all-remote-pci-obj-y += $(crypto-obj-y)
> > +all-remote-pci-obj-y += $(io-obj-y)
> > +all-remote-pci-obj-y += $(chardev-obj-y)
> > +all-remote-pci-obj-y += $(remote-pci-obj-y)
>
> > +remote-pci-obj-$(CONFIG_MPQEMU) += core/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += block/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += pci/
> > +remote-pci-obj-$(CONFIG_MPQEMU) += nvram/
>
> Phew. So you are building half of qemu into the remote process.
>
> Wouldn't it be more useful to split off much smaller, well-defined
> pieces into separate processes?
>
> Splitting off the block layer looks like a good candidate to me. You'll
> have a qemu-remote-block[1] then which should not need much beside
> block/, and a small blockdev-proxy in qemu which talks to
> qemu-remote-block instead of accessing the disk image by itself. It's
> also a nice improvement from the security point of view, even without
> moving the device emulation too, because the main qemu process doesn't
> need access to the image files any more.
I am already playing with an external storage daemon, which would
probably also cover these use cases. It won't be quite as small as you
suggest (e.g. it will have its own QMP interface), but it will still
separate image file handling from the process actually running the
guest.
The idea is to let it export images via the vhost-user protocol, but I
haven't actually started to implement that part yet (at the moment it's
essentially a qemu-nbd replacement that has a QMP monitor that doesn't
understand any commands).
In any case, if you start splitting off smaller pieces, don't use the
block layer because it would be duplicated work.
Kevin
prev parent reply other threads:[~2019-06-18 7:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 18:15 [Qemu-devel] [RFC PATCH v2 06/35] multi-process: build system for remote device process elena.ufimtseva
2019-06-18 6:24 ` Gerd Hoffmann
2019-06-18 7:11 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190618071156.GA4296@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=afaerber@suse.de \
--cc=dgilbert@redhat.com \
--cc=elena.ufimtseva@oracle.com \
--cc=fam@euphon.net \
--cc=jag.raman@oracle.com \
--cc=john.g.johnson@oracle.com \
--cc=kanth.ghatraju@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=kraxel@redhat.com \
--cc=liran.alon@oracle.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=ross.lagerwall@citrix.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).