[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improving QOM documentation [Was: Re: Making QEMU easier for managem
From: |
Markus Armbruster |
Subject: |
Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications] |
Date: |
Fri, 31 Jan 2020 18:23:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Kashyap Chamarthy <address@hidden> writes:
> On Fri, Jan 31, 2020 at 12:02:05PM +0100, Paolo Bonzini wrote:
>> Il ven 31 gen 2020, 11:36 Peter Maydell <address@hidden> ha
>> scritto:
>
> [...]
>
>> The advantage of putting them in the header is that you have them all in
>> one place (inline functions and structs must be in the header). In practice
>> that balances for me the disadvantage of having some comments far from the
>> code they document, which increases the risk of bitrot especially for
>> comments such as "called with lock X held".
>>
>> I definitely agree that the overview/introduction/conventions
>> > side of things is where we'd benefit most if somebody wanted
>> > to try to tackle that. We could roll
>> > https://wiki.qemu.org/Documentation/QOMConventions
>> > into that if we had a better place to put that info.
>> >
>>
>> I am travelling this weekend so I might try to do some kind of thread
>> summary and brain dump in the wiki. I'll leave to Kashyap to do the rST
>> conversion and patch submission. ;-)
>
> Thanks! Happy to be the 'scribe' ;-) I have a skeltal
> qemu-object-model.rst file sitting with some initial content based on
> various sources, including one of your presentations[*] from 2014.
> I'll wait for your new Wiki link to incorporate that content.
>
> (Minor aside: I'm not sure if this file should be in docs/interop/ dir,
> which IIRC, is for things that are 'external' interfaces. And I learn
> that QOM is used both internally in and as an external interface, e.g.
> whenever a device is being created, machine types, CPU config, etc.)
docs/devel/qapi-code-gen.txt has the same problem: it's mostly internal
stuff, but there's also introspection, which is an external interface.
>
> - - -
>
> I've re-skimmed your scarily-titled "QOM exegesis and apocalypse" 2014
> KVM Forum talk slides[*], where the "Why QOM?" slide says:
>
> All device creation, device configuration, backend creation and
> backed configuration done through a single interface
>
> Rigorous support for introspection both of runtime objects and type
> capabilities
For a value of "rigorous".
Let me propose QAPI's query-qmp-schema as the tin standard[*] of
introspection:
* It's documented
* It comes with something that can pass as a type system
* It actually tells you the full truth.
Now compare to QOM:
* Documentation
QAPI: docs/devel/qapi-code-gen.txt section "Client JSON Protocol
introspection"
QOM: Nada
* Type system
QAPI: A few built-in types specified in the documentation, type
constructors for complex types.
QOM: Types are strings, and you just need to know what they mean.
Some string patterns are special: link<STR>, child<STR>, STR[INT], and
you just need to know what that means, too.
* Full truth
QAPI: If you can access it at the interface, you can also see it in
introspection.
QOM: Type introspection can show you only the properties of a freshly
created object. Properties that get created only later are invisible.
Properties that depend on global state are unreliable. Object
introspection is reliable, but only for that object in its current
state.
> Me wonders how much of the above "Why" still holds true today. Although
> further slides give more clues on what worked and what didn't.
>
> I'll wait for fresher details from your upcoming Wiki :-)
>
> [*] http://www.linux-kvm.org/images/9/90/Kvmforum14-qom.pdf
[*] Gold was too expensive, but we had some tin on hand, so...
- Re: Making QEMU easier for management tools and applications, (continued)
- Re: Making QEMU easier for management tools and applications, Markus Armbruster, 2020/01/15
- Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Kashyap Chamarthy, 2020/01/30
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Markus Armbruster, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Paolo Bonzini, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Christophe de Dinechin, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Paolo Bonzini, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Kashyap Chamarthy, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Peter Maydell, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Paolo Bonzini, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Kashyap Chamarthy, 2020/01/31
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications],
Markus Armbruster <=
- Re: Improving QOM documentation [Was: Re: Making QEMU easier for management tools and applications], Markus Armbruster, 2020/01/31
- Re: Making QEMU easier for management tools and applications, Stefan Hajnoczi, 2020/01/20
- Re: Making QEMU easier for management tools and applications, Markus Armbruster, 2020/01/21
- Re: Making QEMU easier for management tools and applications, Stefan Hajnoczi, 2020/01/21
- Re: Making QEMU easier for management tools and applications, Marc-André Lureau, 2020/01/21
- Integrating QOM into QAPI (was: Making QEMU easier for management tools and applications), Markus Armbruster, 2020/01/21
- Re: Integrating QOM into QAPI (was: Making QEMU easier for management tools and applications), Daniel P . Berrangé, 2020/01/21
- Re: Integrating QOM into QAPI, Markus Armbruster, 2020/01/21
- Re: Integrating QOM into QAPI, Marc-André Lureau, 2020/01/21
- Re: Integrating QOM into QAPI, Peter Maydell, 2020/01/21