mbox series

[0/3] Use static_call for kvm_pmu_ops

Message ID 20211103070310.43380-1-likexu@tencent.com (mailing list archive)
Headers show
Series Use static_call for kvm_pmu_ops | expand

Message

Like Xu Nov. 3, 2021, 7:03 a.m. UTC
Hi,

This is a successor to a previous patch set from Jason Baron. Let's convert
kvm_pmu_ops to use static_call. Shows good performance gains for
a typical perf use case [2] in the guest (results in patch 3/3).

[1] https://lore.kernel.org/lkml/cover.1610680941.git.jbaron@akamai.com/
[2] perf record -e branch-instructions -e branch-misses \
-e cache-misses -e cache-references -e cpu-cycles \
-e instructions ./workload

Thanks,

Like Xu (3):
  KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirection
  KVM: x86: Introduce definitions to support static calls for
    kvm_pmu_ops
  KVM: x86: Use static calls to reduce kvm_pmu_ops overhead

 arch/x86/include/asm/kvm-x86-pmu-ops.h | 32 ++++++++++++++++++
 arch/x86/kvm/pmu.c                     | 46 +++++++++++++++-----------
 arch/x86/kvm/pmu.h                     | 19 ++++++++++-
 arch/x86/kvm/vmx/nested.c              |  2 +-
 arch/x86/kvm/x86.c                     |  5 +++
 5 files changed, 83 insertions(+), 21 deletions(-)
 create mode 100644 arch/x86/include/asm/kvm-x86-pmu-ops.h