Use static_call for kvm_pmu_ops
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 5 repliesIn review
- v13 patches 9 repliesSuperseded
Changes in v2 from the cover letter
- Export kvm_pmu_is_valid_msr() for nVMX [Sean]
- Land memcpy() above kvm_ops_static_call_update() [Sean]
- Move the pmu_ops to kvm_x86_init_ops and tagged as __initdata. [Sean]
- Move the kvm_ops_static_call_update() to x86.c [Sean]
- Drop kvm_pmu_ops_static_call_update() [Sean]
- Fix WARNING that macros KVM_X86_OP should not use a trailing semicolon
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | KVM: x86: Export kvm_pmu_is_valid_msr() for nVMXarch/ arch/ | +2 | 1 reply | |
| 2/7 | KVM: x86: Fix WARNING that macros should not use a trailing semicolonarch/ arch/ arch/ | +112 | 0 replies | |
| 3/7 | KVM: x86: Move kvm_ops_static_call_update() to x86.carch/ arch/ | +8 | 0 replies | |
| 4/7 | KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirectionarch/ arch/ arch/ | +26 | 1 reply | |
| 5/7 | KVM: x86: Move .pmu_ops to kvm_x86_init_ops and tagged as __initdataarch/ arch/ arch/ +3 more | +7 | 1 reply | |
| 6/7 | KVM: x86: Introduce definitions to support static calls for kvm_pmu_opsarch/ arch/ arch/ | +43 | 2 replies | |
| 7/7 | KVM: x86: Use static calls to reduce kvm_pmu_ops overheadarch/ arch/ arch/ | +23 | 0 replies |
Reviews trailers per patch
1 of 7 patches has a Reviewed-by or Acked-by.
| Patch | Sean Christopherson |
|---|---|
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | R-b |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/7] Use static_call for kvm_pmu_ops
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).
V1 -> V2 Changelog:
- Export kvm_pmu_is_valid_msr() for nVMX [Sean]
- Land memcpy() above kvm_ops_static_call_update() [Sean]
- Move the pmu_ops to kvm_x86_init_ops and tagged as __initdata. [Sean]
- Move the kvm_ops_static_call_update() to x86.c [Sean]
- Drop kvm_pmu_ops_static_call_update() [Sean]
- Fix WARNING that macros KVM_X86_OP should not use a trailing semicolon
Previous:
https://lore.kernel.org/kvm/[email protected]/
[1] https://lore.kernel.org/lkml/[email protected]/
[2] perf record -e branch-instructions -e branch-misses \
-e cache-misses -e cache-references -e cpu-cycles \
-e instructions ./workload
Thanks,
Like Xu (7):
KVM: x86: Export kvm_pmu_is_valid_msr() for nVMX
KVM: x86: Fix WARNING that macros should not use a trailing semicolon
KVM: x86: Move kvm_ops_static_call_update() to x86.c
KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirection
KVM: x86: Move .pmu_ops to kvm_x86_init_ops and tagged as __initdata
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-ops.h | 218 ++++++++++++------------- arch/x86/include/asm/kvm-x86-pmu-ops.h | 32 ++++ arch/x86/include/asm/kvm_host.h | 14 +- arch/x86/kvm/pmu.c | 46 +++--- arch/x86/kvm/pmu.h | 9 +- arch/x86/kvm/svm/pmu.c | 2 +- arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/vmx/nested.c | 2 +- arch/x86/kvm/vmx/pmu_intel.c | 2 +- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/x86.c | 16 +- 11 files changed, 199 insertions(+), 146 deletions(-) create mode 100644 arch/x86/include/asm/kvm-x86-pmu-ops.h
Signature · 1 line
2.33.0