qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] Add dbus-vmstate
Date: Tue, 9 Jul 2019 12:26:38 +0400	[thread overview]
Message-ID: <CAMxuvaxih_D9HLRnRxhNweux3LsOsxCxzYn6VY748sJx0w8KSQ@mail.gmail.com> (raw)
In-Reply-To: <20190708160442.GL3082@redhat.com>

Hi

On Mon, Jul 8, 2019 at 8:04 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > The D-Bus protocol can be made to work peer-to-peer, but the most
> > common and practical way is through a bus daemon. This also has the
> > advantage of increased debuggability (you can eavesdrop on the bus and
> > introspect it).
>
> The downside of using the bus daemon is that we have to spawn a new
> instance of dbus-daemon for every QEMU VM that's running on the host,
> which is yet more memory overhead for each VM & another process to
> manage, and yet another thing to go wrong.

dbus-daemon (or dbus-broker) has been optimized to fit on many devices
and use cases, it doesn't take much memory (3mb for my session dbus
right now).

More processes to manage is inevitable. In a near future, we may have
5-10 processes running around qemu. I think dbus-daemon will be one of
the easiest to deal with. (as can be seen in the dbus-vmstate test, it
is very simple to start a private dbus-daemon)

>
> QEMU already has a direct UNIX socket connection to the helper
> processes in question. I'd much rather we just had another direct
> UNIX socket  connection to that helper, using D-Bus peer-to-peer.
> The benefit of debugging doesn't feel compelling enough to justify
> running an extra daemon for each VM.

I wouldn't minor the need for easier debugging. Debugging multiple
processes talking to each other is really hard. Having a bus is
awesome (if not required) in this case.

There are other advantages of using a bus, those come to my mind:

- less connections (bus topology)
- configuring/enforcing policies & limits
- on-demand service activation & discoverability

I also think D-Bus is the IPC of choice for multi-process. It's easier
to use than many other IPC due to the various tools and language
bindings available. Having a common bus is a good incentive to use a
common IPC, instead of a dozen of half-baked protocols.

Nevertheless, I also think we could use D-Bus in peer-to-peer mode,
and I did some investigation. The slirp-helper supports it. We could
teach dbus-vmstate to eastablish peer-to-peer connections. Instead of
receiving a bus address and list of Ids, it could have a list of dbus
peer socket path. Both approaches are not incompatible, but I think
the bus benefits outweigh the downside of running an extra process.


  reply	other threads:[~2019-07-09  8:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08  7:24 [Qemu-devel] [PATCH 0/3] Add dbus-vmstate Marc-André Lureau
2019-07-08  7:24 ` [Qemu-devel] [PATCH 1/3] qemu-file: move qemu_{get, put}_counted_string() declarations Marc-André Lureau
2019-07-08  8:03   ` Juan Quintela
2019-07-08  7:24 ` [Qemu-devel] [PATCH 2/3] tests: add qtest_set_exit_status() Marc-André Lureau
2019-07-08  8:04   ` Juan Quintela
2019-07-17 11:50   ` Thomas Huth
2019-07-08  7:24 ` [Qemu-devel] [PATCH 3/3] Add dbus-vmstate object Marc-André Lureau
2019-07-08  8:41   ` Juan Quintela
2019-07-08 16:11     ` Eric Blake
2019-07-10  6:14   ` Paolo Bonzini
2019-07-10  8:05     ` Daniel P. Berrangé
2019-07-08  8:01 ` [Qemu-devel] [PATCH 0/3] Add dbus-vmstate no-reply
2019-07-08  9:35 ` no-reply
2019-07-08 15:44 ` Dr. David Alan Gilbert
2019-07-08 16:08   ` Daniel P. Berrangé
2019-07-08 16:04 ` Daniel P. Berrangé
2019-07-09  8:26   ` Marc-André Lureau [this message]
2019-07-09  9:01     ` Daniel P. Berrangé
2019-07-09 10:47       ` Marc-André Lureau
2019-07-10  9:10         ` Daniel P. Berrangé
2019-07-10  8:53   ` Paolo Bonzini
2019-07-10  9:03     ` Daniel P. Berrangé
2019-07-10  9:54       ` Paolo Bonzini

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=CAMxuvaxih_D9HLRnRxhNweux3LsOsxCxzYn6VY748sJx0w8KSQ@mail.gmail.com \
    --to=marcandre.lureau@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@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).