Skip to content

RFC KVM: stats: Retrieve statistics data in binary format

Jing Zhang kvm kvm-ppc kvmarm linux-kselftest linux-mips linux-s390 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: stats: Separate statistics name strings from debugfs codearch/arm64/kvm/guest.c arch/mips/kvm/mips.c arch/powerpc/kvm/book3s.c +4 more+589 -2412 replies
2/4KVM: stats: Define APIs for aggregated stats retrieval in binary formatDocumentation/virt/kvm/api.rst include/linux/kvm_host.h include/uapi/linux/kvm.h+139 -12 replies
3/4KVM: stats: Add ioctl commands to pull statistics in binary formatvirt/kvm/kvm_main.c+115 -014 replies
4/4KVM: selftests: Add selftest for KVM binary form statistics interfacetools/testing/selftests/kvm/.gitignore tools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/kvm_bin_form_stats.c+93 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/4] KVM: stats: Retrieve statistics data in binary format

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

Signature · 1 line
2.30.1.766.gb4fecdf3b7-goog