kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Like Xu <like.xu.linux@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Use static_call for kvm_pmu_ops
Date: Wed,  3 Nov 2021 15:03:07 +0800	[thread overview]
Message-ID: <20211103070310.43380-1-likexu@tencent.com> (raw)

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

-- 
2.33.0


             reply	other threads:[~2021-11-03  7:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  7:03 Like Xu [this message]
2021-11-03  7:03 ` [PATCH 1/3] KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirection Like Xu
2021-11-05 15:30   ` Sean Christopherson
2021-11-05 15:36     ` Sean Christopherson
2021-11-08  9:26       ` Like Xu
2021-11-08  9:23     ` Like Xu
2021-11-03  7:03 ` [PATCH 2/3] KVM: x86: Introduce definitions to support static calls for kvm_pmu_ops Like Xu
2021-11-05 15:48   ` Sean Christopherson
2021-11-08  9:31     ` Like Xu
2021-11-08 15:41       ` Sean Christopherson
2021-11-03  7:03 ` [PATCH 3/3] KVM: x86: Use static calls to reduce kvm_pmu_ops overhead Like Xu
2021-11-03 12:08   ` Yao Yuan
2021-11-04  8:14     ` Like Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211103070310.43380-1-likexu@tencent.com \
    --to=like.xu.linux@gmail.com \
    --cc=bp@alien8.de \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).