From: "Daniel P. Berrange" <berrange@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
peter.maydell@linaro.org, pkrempa@redhat.com,
Eduardo Habkost <ehabkost@redhat.com>,
cohuck@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [RFC 4/6] CLI: add -paused option
Date: Tue, 17 Oct 2017 16:52:54 +0100 [thread overview]
Message-ID: <20171017155254.GH31897@redhat.com> (raw)
In-Reply-To: <20171017174703.7bb77801@nial.brq.redhat.com>
On Tue, Oct 17, 2017 at 05:47:03PM +0200, Igor Mammedov wrote:
> On Tue, 17 Oct 2017 16:35:15 +0100
> "Daniel P. Berrange" <berrange@redhat.com> wrote:
>
> > On Tue, Oct 17, 2017 at 05:21:13PM +0200, Laszlo Ersek wrote:
> > > On 10/17/17 16:48, Daniel P. Berrange wrote:
> > > > On Mon, Oct 16, 2017 at 07:01:01PM +0200, Paolo Bonzini wrote:
> > > >> On 16/10/2017 18:59, Eduardo Habkost wrote:
> > > >>>> +DEF("paused", HAS_ARG, QEMU_OPTION_paused, \
> > > >>>> + "-paused [state=]postconf|preconf\n"
> > > >>>> + " postconf: pause QEMU after machine is initialized\n"
> > > >>>> + " preconf: pause QEMU before machine is initialized\n",
> > > >>>> + QEMU_ARCH_ALL)
> > > >>> I would like to allow pausing before machine-type is selected, so
> > > >>> management could run query-machines before choosing a
> > > >>> machine-type. Would that need a third "-pause" mode, or will we
> > > >>> be able to change "preconf" to pause before select_machine() is
> > > >>> called?
> > > >>>
> > > >>> The same probably applies to other things initialized before
> > > >>> machine_run_board_init() that could be configurable using QMP,
> > > >>> including but not limited to:
> > > >>> * Accelerator configuration
> > > >>> * Registering global properties
> > > >>> * RAM size
> > > >>> * SMP/CPU configuration
> > > >>
> > > >> Should (or could) "-M none" be changed in a backwards-compatible way to
> > > >> allow such preconfiguration? For example
> > > >>
> > > >> qemu -M none -monitor stdio
> > > >> (qemu) machine-set-options pc,accel=kvm
> > > >> (qemu) c
> > > >
> > > > Going down this route has pretty major implications for the way libvirt
> > > > manages QEMU, and support / debugging of it. When you look at the QEMU
> > > > command line libvirt uses it will be almost devoid of any useful info.
> > > > So it will be more involved job to figure out just how QEMU is configured.
> > > > This also means it is difficult to replicate the config that libvirt has
> > > > used, outside of libvirt for sake of debugging.
> > > >
> > > > I also think it will have pretty significant performance implications
> > > > for QEMU startup. To configure a guest via the monitor is going to
> > > > require a huge number of monitor commands to be executed to replicate
> > > > what we traditionally configured via ARGV. While each monitor command
> > > > is not massively slow, the round-trip time of each command will quickly
> > > > add up to several 100 milliseconds, perhaps even seconds in the the
> > > > case of very large configs.
> > > >
> > > > Maybe we ultimately have no choice and this is inevitable, but I am
> > > > pretty wary of going in the direction of launching bare QEMU and
> > > > configuring everything via a huge number of monitor calls.
> > >
> > > Where's the sweet spot between
> > > - configuring everything dynamically, over QMP,
> > > - and invoking QEMU separately, for querying capabilities etc?
> >
> > The key with the way we currently invoke & query QEMU over QMP to detect
> > capabilities is that this is not tied to a specific VM launch process.
> > We can query capabilities and cache them until such time as we detect
> > a QEMU binary change. So this never impacts on the startup performance
> > of individual VMs. The caching is critical, because querying capabilities
> > is actually quite time intensive already, taking many seconds to query
> > capabilities on all the different target binaries we have.
> is there another alternative for usecase where one option values depends (-numa cpu)
> on values of another option values (-M + -smp + -cpu)?
> so far we have 2 options on the table:
> 1: do configuration at runtime like in this series
> 2: start qemu 2 times
> 1st to query cpu layout and
> 2nd add -numa options using data from the 1st step
Conceptually the problem occurs in places where libvirt does not fully
specifiy the object being created, leaving QEMU todo some config internally.
The elephant in the room in this regard is '-machine', since the machine
baseboard implies creation of a variety of embedded devices. Libvirt has
embedded knowledge about what device buses are assocaited with each machine
type (ie ISA, PCI, PCI-X, etc). In theory this information could be
introspectable ahead of time because the info about what controllers are
associated with 'pc' or 'q35' is static. In practical terms though, the
QEMU code for populating machines is not structured in a way that would
allow such introspection without instantiating the machine type.
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 :|
next prev parent reply other threads:[~2017-10-17 15:53 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 16:22 [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP Igor Mammedov
2017-10-16 16:22 ` [Qemu-devel] [RFC 1/6] numa: postpone options post-processing till machine_run_board_init() Igor Mammedov
2017-10-17 5:49 ` David Gibson
2017-10-16 16:22 ` [Qemu-devel] [RFC 2/6] numa: split out NumaOptions parsing into parse_NumaOptions() Igor Mammedov
2017-10-18 3:27 ` David Gibson
2017-10-18 14:53 ` Eric Blake
2017-10-16 16:22 ` [Qemu-devel] [RFC 3/6] possible_cpus: add CPUArchId::type field Igor Mammedov
2017-10-18 11:12 ` [Qemu-devel] [RFC v2 " Igor Mammedov
2017-10-19 6:31 ` David Gibson
2017-10-31 14:01 ` Igor Mammedov
2017-11-06 18:02 ` Eduardo Habkost
2017-11-07 15:04 ` Cornelia Huck
2017-11-09 6:58 ` David Gibson
2017-11-09 20:02 ` Eduardo Habkost
2017-11-10 10:14 ` Cornelia Huck
2017-11-10 12:34 ` David Hildenbrand
2017-11-10 12:58 ` Eduardo Habkost
2017-11-10 13:07 ` David Hildenbrand
2017-11-21 14:02 ` Igor Mammedov
2017-11-09 6:53 ` David Gibson
2017-10-16 16:22 ` [Qemu-devel] [RFC 4/6] CLI: add -paused option Igor Mammedov
2017-10-16 16:35 ` Daniel P. Berrange
2017-10-17 8:17 ` Igor Mammedov
2017-10-17 10:56 ` Laszlo Ersek
2017-10-17 11:11 ` Peter Krempa
2017-10-20 15:38 ` Eduardo Habkost
2017-10-16 16:59 ` Eduardo Habkost
2017-10-16 17:01 ` Paolo Bonzini
2017-10-16 17:17 ` Eduardo Habkost
2017-10-17 8:47 ` Paolo Bonzini
2017-10-17 9:25 ` Igor Mammedov
2017-10-17 14:48 ` Daniel P. Berrange
2017-10-17 15:21 ` Laszlo Ersek
2017-10-17 15:35 ` Daniel P. Berrange
2017-10-17 15:42 ` Laszlo Ersek
2017-10-17 15:47 ` Daniel P. Berrange
2017-10-17 15:47 ` Igor Mammedov
2017-10-17 15:52 ` Daniel P. Berrange [this message]
2017-10-17 9:10 ` Igor Mammedov
2017-10-19 10:42 ` David Gibson
2017-10-20 0:15 ` Eduardo Habkost
2017-10-20 1:19 ` David Gibson
2017-10-20 14:21 ` Eduardo Habkost
2017-10-23 9:49 ` Igor Mammedov
2017-10-23 9:53 ` Daniel P. Berrange
2017-10-23 10:36 ` Igor Mammedov
2017-10-23 10:49 ` Daniel P. Berrange
2017-10-23 11:18 ` Igor Mammedov
2017-10-25 10:52 ` Eduardo Habkost
2017-10-25 10:35 ` Eduardo Habkost
2017-10-23 9:30 ` Alex Bennée
2017-10-16 16:22 ` [Qemu-devel] [RFC 5/6] HMP: add set-numa-node command Igor Mammedov
2017-10-16 16:22 ` [Qemu-devel] [RFC 6/6] QMP: " Igor Mammedov
2017-10-16 16:36 ` [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP Daniel P. Berrange
2017-10-16 17:05 ` Eduardo Habkost
2017-10-17 7:27 ` Igor Mammedov
2017-10-17 15:07 ` Daniel P. Berrange
2017-10-17 15:24 ` Laszlo Ersek
2017-10-17 16:06 ` Igor Mammedov
2017-10-17 16:09 ` Daniel P. Berrange
2017-10-17 16:18 ` Igor Mammedov
2017-10-18 12:59 ` Eduardo Habkost
2017-10-18 14:44 ` Igor Mammedov
2017-10-18 14:49 ` Daniel P. Berrange
2017-10-18 15:24 ` Igor Mammedov
2017-10-18 15:27 ` Daniel P. Berrange
2017-10-18 20:11 ` Eduardo Habkost
2017-10-18 15:30 ` Daniel P. Berrange
2017-10-18 20:22 ` Eduardo Habkost
2017-10-19 11:49 ` David Gibson
2017-10-19 12:23 ` Paolo Bonzini
2017-10-20 1:21 ` David Gibson
2017-10-20 19:53 ` Eduardo Habkost
2017-10-23 8:17 ` Igor Mammedov
2017-10-23 8:45 ` Igor Mammedov
2017-10-25 6:57 ` Eduardo Habkost
2017-10-25 7:02 ` Daniel P. Berrange
2017-10-25 13:37 ` Eduardo Habkost
2017-10-19 15:21 ` Igor Mammedov
2017-10-19 15:28 ` Daniel P. Berrange
2017-10-19 19:56 ` Eduardo Habkost
2017-10-20 9:07 ` Daniel P. Berrange
2017-10-20 20:07 ` Eduardo Habkost
2017-10-23 8:53 ` Igor Mammedov
2017-10-23 10:04 ` Igor Mammedov
2017-10-23 10:19 ` Daniel P. Berrange
2017-10-18 12:19 ` Paolo Bonzini
2017-10-18 12:27 ` Daniel P. Berrange
2017-10-18 12:33 ` Paolo Bonzini
2017-10-18 14:26 ` Igor Mammedov
2017-10-18 14:29 ` Paolo Bonzini
2017-10-18 14:54 ` Igor Mammedov
2017-10-18 14:21 ` Igor Mammedov
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=20171017155254.GH31897@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.