All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] qmp, hmp: statistics subsystem and KVM suport.
@ 2022-05-16  9:00 Paolo Bonzini
  2022-05-16  9:00 ` [PATCH v3 1/8] qmp: Support for querying stats Paolo Bonzini
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Paolo Bonzini @ 2022-05-16  9:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, berrange, dgilbert

This patchset adds QEMU support for querying fd-based KVM statistics.
This allows the user to analyze the behavior of the VM without access
to debugfs.

However, instead of adding an ad hoc command, the new QMP entry point
can be extended in the future to more statistics provider than KVM
(for example TCG, tap, or the block layer) and to more objects than
the VM and vCPUS (for example network interfaces or block devices).

Because the statistics exposed by KVM are not known at compile time,
the kernel interface also comes with an introspectable schema.  This
schema is exposed by the query-stats-schemas QMP command.

Patches 1 and 2 add the basic support, respectively the QMP command
and the KVM producer.

Patches 3 and 4 add a basic HMP implementation.  The first of the two
adds a basic filtering mechanism to the QMP command, which is then used
by HMP (which only shows vCPU statistics for the currently selected
guest CPU; this is consistent with other HMP commands and does not
flood the user with an overwhelming amount of output).

The remaining patches add more filtering, respectively by provider
and by the name of a statistic.

The v2->v3 delta is just improved commit messages and documentation,
especially around the rationale for the separate introspection mechanism
and the stability of the data.

Paolo

Mark Kanda (3):
  qmp: Support for querying stats
  kvm: Support for querying fd-based stats
  hmp: add basic "info stats" implementation

Paolo Bonzini (5):
  qmp: add filtering of statistics by target vCPU
  qmp: add filtering of statistics by provider
  hmp: add filtering of statistics by provider
  qmp: add filtering of statistics by name
  hmp: add filtering of statistics by name

 accel/kvm/kvm-all.c     | 414 ++++++++++++++++++++++++++++++++++++++++
 hmp-commands-info.hx    |  14 ++
 include/monitor/hmp.h   |   1 +
 include/monitor/stats.h |  42 ++++
 monitor/hmp-cmds.c      | 229 ++++++++++++++++++++++
 monitor/qmp-cmds.c      | 132 +++++++++++++
 qapi/meson.build        |   1 +
 qapi/qapi-schema.json   |   1 +
 qapi/stats.json         | 246 ++++++++++++++++++++++++
 9 files changed, 1080 insertions(+)
 create mode 100644 include/monitor/stats.h
 create mode 100644 qapi/stats.json

-- 
2.36.0



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-05-25 14:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16  9:00 [PATCH v3 0/8] qmp, hmp: statistics subsystem and KVM suport Paolo Bonzini
2022-05-16  9:00 ` [PATCH v3 1/8] qmp: Support for querying stats Paolo Bonzini
2022-05-16 12:00   ` Markus Armbruster
2022-05-16 14:48     ` Paolo Bonzini
2022-05-16  9:00 ` [PATCH v3 2/8] kvm: Support for querying fd-based stats Paolo Bonzini
2022-05-24 18:44   ` Dr. David Alan Gilbert
2022-05-16  9:02 ` Paolo Bonzini
2022-05-16  9:02 ` [PATCH v3 3/8] qmp: add filtering of statistics by target vCPU Paolo Bonzini
2022-05-16 12:04   ` Markus Armbruster
2022-05-16 14:31     ` Paolo Bonzini
2022-05-16  9:02 ` [PATCH v3 4/8] hmp: add basic "info stats" implementation Paolo Bonzini
2022-05-24 19:10   ` Dr. David Alan Gilbert
2022-05-16  9:02 ` [PATCH v3 5/8] qmp: add filtering of statistics by provider Paolo Bonzini
2022-05-16  9:02 ` [PATCH v3 6/8] hmp: " Paolo Bonzini
2022-05-25 10:35   ` Dr. David Alan Gilbert
2022-05-25 14:01     ` Paolo Bonzini
2022-05-16  9:02 ` [PATCH v3 7/8] qmp: add filtering of statistics by name Paolo Bonzini
2022-05-16  9:02 ` [PATCH v3 8/8] hmp: " Paolo Bonzini

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.