[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 14/15] qmp: support out-of-band (oob) execution
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [RFC 14/15] qmp: support out-of-band (oob) execution |
Date: |
Fri, 15 Sep 2017 10:59:47 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Thu, Sep 14, 2017 at 04:33:34PM +0100, Stefan Hajnoczi wrote:
> On Thu, Sep 14, 2017 at 03:50:35PM +0800, Peter Xu wrote:
> > diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
> > index 61fa167..47d16bb 100644
> > --- a/docs/devel/qapi-code-gen.txt
> > +++ b/docs/devel/qapi-code-gen.txt
> > @@ -665,6 +665,16 @@ allowed to run out-of-band can also be introspected
> > using
> > query-qmp-schema command. Please see the section "Client JSON
> > Protocol introspection" for more information.
> >
> > +To execute a command in out-of-band way, we need to specify the
> > +"control" field in the request, with "run-oob" set to true. Example:
> > +
> > + => { "execute": "command-support-oob",
> > + "arguments": { ... },
> > + "control": { "run-oob": true } }
> > + <= { "return": { } }
> > +
> > +Without it, even the commands that supports out-of-band execution will
> > +still be run in-band.
>
> Is there a more relevant place to document QMP run-oob behavior than the
> "How to use the QAPI code generator document"?
I agree, but I don't really know it. :(
Markus, could you provide a hint?
>
> > @@ -3963,6 +3964,16 @@ static void handle_qmp_command(JSONMessageParser
> > *parser, GQueue *tokens,
> > req_obj->id = id;
> > req_obj->req = req;
> >
> > + if (qmp_is_oob(req)) {
> > + /*
> > + * Trigger fast-path to handle the out-of-band request, by
> > + * executing the command directly in parser.
> > + */
> > + trace_monitor_qmp_cmd_out_of_band(qobject_get_str(req_obj->id));
> > + monitor_qmp_dispatch_one(req_obj);
> > + return;
> > + }
>
> A "fast-path" is a performance optimization. OOB is not a performance
> optimization, it changes the semantics of command execution. Please
> mention the semantics of OOB command execution instead.
I'll remove the "fast-path" wording and try to think out something
better than this comment. After I know a good place to document, I
can put it there as well. Thanks,
--
Peter Xu
- [Qemu-devel] [RFC 06/15] monitor: move the cur_mon hack deeper for QMP, (continued)
- [Qemu-devel] [RFC 06/15] monitor: move the cur_mon hack deeper for QMP, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 07/15] monitor: unify global init, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 08/15] monitor: create IO thread, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 09/15] monitor: allow to use IO thread for parsing, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 10/15] monitor: introduce monitor_qmp_respond(), Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 11/15] monitor: separate QMP parser and dispatcher, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 12/15] monitor: enable IO thread for (qmp & !mux) typed, Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 13/15] qapi: introduce new cmd option "allow-oob", Peter Xu, 2017/09/14
- [Qemu-devel] [RFC 14/15] qmp: support out-of-band (oob) execution, Peter Xu, 2017/09/14
- Re: [Qemu-devel] [RFC 14/15] qmp: support out-of-band (oob) execution, Dr. David Alan Gilbert, 2017/09/15
[Qemu-devel] [RFC 15/15] qmp: let migrate-incoming allow out-of-band, Peter Xu, 2017/09/14
Re: [Qemu-devel] [RFC 00/15] QMP: out-of-band (OOB) execution support, Marc-André Lureau, 2017/09/14