kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] KVM: stats: Retrieve statistics data in binary format
@ 2021-03-10  0:30 Jing Zhang
  2021-03-10  0:30 ` [RFC PATCH 1/4] KVM: stats: Separate statistics name strings from debugfs code Jing Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Jing Zhang @ 2021-03-10  0:30 UTC (permalink / raw)
  To: KVM, KVM ARM, Linux MIPS, KVM PPC, Linux S390, Linux kselftest,
	Paolo Bonzini, Marc Zyngier, James Morse, Julien Thierry,
	Suzuki K Poulose, Will Deacon, Huacai Chen, Aleksandar Markovic,
	Thomas Bogendoerfer, Paul Mackerras, Christian Borntraeger,
	Janosch Frank, David Hildenbrand, Cornelia Huck,
	Claudio Imbrenda, Sean Christopherson, Vitaly Kuznetsov,
	Jim Mattson, Peter Shier, Oliver Upton, David Rientjes,
	Emanuele Giuseppe Esposito
  Cc: Jing Zhang

This patchset extends IOCTL interface to retrieve KVM statistics data
in aggregated binary format.
It is meant to provide a lightweight, flexible, scalable and efficient 
lock-free solution for userspace telemetry applications to pull the
statistics data periodically for large scale systems.
The capability is indicated by KVM_CAP_STATS_BINARY_FORM.
Ioctl KVM_STATS_GET_INFO is used to get the information about VM or
vCPU statistics data (The number of supported statistics data which is
used for buffer allocation).
Ioctl KVM_STATS_GET_NAMES is used to get the list of name strings of
all supported statistics data.
Ioctl KVM_STATS_GET_DATA is used to get the aggregated statistics data
per VM or vCPU in the same order as the list of name strings. This is
the ioctl which would be called periodically to retrieve statistics
data per VM or vCPU.

Jing Zhang (4):
  KVM: stats: Separate statistics name strings from debugfs code
  KVM: stats: Define APIs for aggregated stats retrieval in binary
    format
  KVM: stats: Add ioctl commands to pull statistics in binary format
  KVM: selftests: Add selftest for KVM binary form statistics interface

 Documentation/virt/kvm/api.rst                |  79 +++++
 arch/arm64/kvm/guest.c                        |  47 ++-
 arch/mips/kvm/mips.c                          | 114 +++++--
 arch/powerpc/kvm/book3s.c                     | 107 ++++--
 arch/powerpc/kvm/booke.c                      |  84 +++--
 arch/s390/kvm/kvm-s390.c                      | 320 ++++++++++++------
 arch/x86/kvm/x86.c                            | 127 ++++---
 include/linux/kvm_host.h                      |  30 +-
 include/uapi/linux/kvm.h                      |  60 ++++
 tools/testing/selftests/kvm/.gitignore        |   1 +
 tools/testing/selftests/kvm/Makefile          |   3 +
 .../selftests/kvm/kvm_bin_form_stats.c        |  89 +++++
 virt/kvm/kvm_main.c                           | 115 +++++++
 13 files changed, 935 insertions(+), 241 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/kvm_bin_form_stats.c


base-commit: 357ad203d45c0f9d76a8feadbd5a1c5d460c638b
-- 
2.30.1.766.gb4fecdf3b7-goog


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

end of thread, other threads:[~2021-03-16 17:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  0:30 [RFC PATCH 0/4] KVM: stats: Retrieve statistics data in binary format Jing Zhang
2021-03-10  0:30 ` [RFC PATCH 1/4] KVM: stats: Separate statistics name strings from debugfs code Jing Zhang
2021-03-10 14:19   ` Marc Zyngier
2021-03-10 18:51     ` Jing Zhang
2021-03-10  0:30 ` [RFC PATCH 2/4] KVM: stats: Define APIs for aggregated stats retrieval in binary format Jing Zhang
2021-03-10 14:58   ` Marc Zyngier
2021-03-10 19:36     ` Jing Zhang
2021-03-10  0:30 ` [RFC PATCH 3/4] KVM: stats: Add ioctl commands to pull statistics " Jing Zhang
2021-03-10 14:55   ` Paolo Bonzini
2021-03-10 21:41     ` Jing Zhang
2021-03-12 18:11       ` Paolo Bonzini
2021-03-12 22:27         ` Jing Zhang
2021-03-13  9:35           ` Paolo Bonzini
2021-03-15 22:31     ` Jing Zhang
2021-03-16 17:54       ` Paolo Bonzini
2021-03-10 15:51   ` Marc Zyngier
2021-03-10 16:03     ` Paolo Bonzini
2021-03-10 17:05       ` Marc Zyngier
2021-03-10 17:11         ` Paolo Bonzini
2021-03-10 17:31           ` Marc Zyngier
2021-03-10 17:44             ` Paolo Bonzini
2021-03-10 21:43               ` Jing Zhang
2021-03-10  0:30 ` [RFC PATCH 4/4] KVM: selftests: Add selftest for KVM binary form statistics interface Jing Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).