qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/8] qmp: add filtering of statistics by name


From: Paolo Bonzini
Subject: Re: [PATCH 7/8] qmp: add filtering of statistics by name
Date: Thu, 28 Apr 2022 11:53:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/27/22 19:16, Dr. David Alan Gilbert wrote:
* Paolo Bonzini (pbonzini@redhat.com) wrote:
On 4/27/22 17:16, Dr. David Alan Gilbert wrote:
* Paolo Bonzini (pbonzini@redhat.com) wrote:
On 4/27/22 14:34, Dr. David Alan Gilbert wrote:
If I specify a 'vm' it's not obvious to me whether I'd get NICs and
block devices in the future?

VM would not get those (it's global statistics), but the size could balloon
if you specify no target at all.

Adding a syntax for 'all' into the vcpus list would fix that?

I don't like having special syntax.  The current QAPI just doesn't filter
what is not in the arguments.

Is there a object that represents the set of all vcpus?

No.

If it was easy to create one then you could remove all the special
casing of vCPUs/VM target?
(It feels really like you should call a 'stats' method on the target)

There are two possibilities for that:

1) add statistics to an object like /machine, that would return the sum/max of the statistics. Advantage: you have an easy way to summarize stats without reading many KBs of data. Disadvantage: it doesn't do what you're asking. :) But it may be an interesting addition.

2) make query-stats return the statistics for all objects below a given QOM path, and then the caller would pass / or /machine as the target.

Both make sense, but neither extends easily to the case where you don't have a QOM path, as is the case for block or network devices. Unfortunately, both of them are prime candidates for extending the subsystem, so they can't be dismissed easily, and that is why implemented neither of them.

If block or network devices were QOM, it would be possible and easy to have a single "qom-path" argument to replace both "target" and the sub-records like StatsVCPUFilter.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]