Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-19 Thread Daniel P . Berrangé
On Wed, Jan 19, 2022 at 09:43:23AM +0100, Paolo Bonzini wrote: > On 1/18/22 15:47, Igor Mammedov wrote: > > and what exactly this CPU ID is, > > may QOM path pointing to VCPU instance would be better? > > For x86 it would be the APIC ID but yes, having a QOM path is more future > proof. Thanks Ig

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-19 Thread Paolo Bonzini
On 1/18/22 15:47, Igor Mammedov wrote: and what exactly this CPU ID is, may QOM path pointing to VCPU instance would be better? For x86 it would be the APIC ID but yes, having a QOM path is more future proof. Thanks Igor for noting this. Paolo

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-19 Thread Paolo Bonzini
On 1/18/22 14:59, Mark Kanda wrote: OK. Thank you Daniel and Paolo. I'll implement these changes for v3. To clarify, the command should be { 'command': 'query-stats', 'data': 'StatsFilter', 'returns': 'StatsResults' } so the "target" would be mandatory and there's one level less of

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-18 Thread Igor Mammedov
On Tue, 18 Jan 2022 12:52:10 + Daniel P. Berrangé wrote: > On Tue, Jan 18, 2022 at 01:26:32PM +0100, Paolo Bonzini wrote: > > On 1/17/22 16:17, Mark Kanda wrote: > > > > > > > > I agree except that I think this and StatsResults should be unions, > > > > even if it means running multiple qu

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-18 Thread Mark Kanda
On 1/18/2022 6:52 AM, Daniel P. Berrangé wrote: On Tue, Jan 18, 2022 at 01:26:32PM +0100, Paolo Bonzini wrote: On 1/17/22 16:17, Mark Kanda wrote: I agree except that I think this and StatsResults should be unions, even if it means running multiple query-stats commands. IIUC, making StatsResul

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-18 Thread Daniel P . Berrangé
On Tue, Jan 18, 2022 at 01:26:32PM +0100, Paolo Bonzini wrote: > On 1/17/22 16:17, Mark Kanda wrote: > > > > > > I agree except that I think this and StatsResults should be unions, > > > even if it means running multiple query-stats commands. > > > > IIUC, making StatsResults a union implies the

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-18 Thread Paolo Bonzini
On 1/17/22 16:17, Mark Kanda wrote: I agree except that I think this and StatsResults should be unions, even if it means running multiple query-stats commands. IIUC, making StatsResults a union implies the filter is a required argument (currently it is optional - omitting it dumps all VM an

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-17 Thread Mark Kanda
On 1/17/2022 6:05 AM, Paolo Bonzini wrote: On 12/7/21 19:42, Daniel P. Berrangé wrote: Now onto the values being reported. AFAICT from the kernel docs, for all the types of data it currently reports (cumulative, instant, peak, none), there is only ever going to be a single value. I assume the ab

Re: [PATCH v2 1/3] qmp: Support for querying stats

2022-01-17 Thread Paolo Bonzini
On 12/7/21 19:42, Daniel P. Berrangé wrote: Now onto the values being reported. AFAICT from the kernel docs, for all the types of data it currently reports (cumulative, instant, peak, none), there is only ever going to be a single value. I assume the ability to report multiple values is future pr

Re: [PATCH v2 1/3] qmp: Support for querying stats

2021-12-07 Thread Daniel P . Berrangé
Copying in Markus as QAPI maintainer, since I feel this proposed design is a little oddball from typical QAPI design approach On Fri, Nov 19, 2021 at 01:51:51PM -0600, Mark Kanda wrote: > Introduce qmp support for querying stats. Provide a framework for > adding new stats and support for the f

[PATCH v2 1/3] qmp: Support for querying stats

2021-11-19 Thread Mark Kanda
Introduce qmp support for querying stats. Provide a framework for adding new stats and support for the following commands: - query-stats Returns a list of all stats, with options for specifying a stat name and schema type. A schema type is the set of stats associated with a given component (e.g. v