From: Peter Xu <peterx@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Peter Xu <zhexu@redhat.com>,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 3/3] KVM: X86: Tune PLE Window tracepoint
Date: Tue, 30 Jul 2019 10:39:04 +0800 [thread overview]
Message-ID: <20190730023904.GG19232@xz-x1> (raw)
In-Reply-To: <20190730022844.GK21120@linux.intel.com>
On Mon, Jul 29, 2019 at 07:28:44PM -0700, Sean Christopherson wrote:
> On Tue, Jul 30, 2019 at 10:25:25AM +0800, Peter Xu wrote:
> > On Tue, Jul 30, 2019 at 10:12:45AM +0800, Peter Xu wrote:
> > > On Mon, Jul 29, 2019 at 07:06:07PM -0700, Sean Christopherson wrote:
> > > > > > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> > > > > > > index d98eac371c0a..cc1f98130e6a 100644
> > > > > > > --- a/arch/x86/kvm/vmx/vmx.c
> > > > > > > +++ b/arch/x86/kvm/vmx/vmx.c
> > > > > > > @@ -5214,7 +5214,7 @@ static void grow_ple_window(struct kvm_vcpu *vcpu)
> > > > > > > if (vmx->ple_window != old)
> > > > > > > vmx->ple_window_dirty = true;
> > > > > > >
> > > > > > > - trace_kvm_ple_window_grow(vcpu->vcpu_id, vmx->ple_window, old);
> > > > > > > + trace_kvm_ple_window_changed(vcpu->vcpu_id, vmx->ple_window, old);
> > > > > >
> > > > > > No need for the macro, the snippet right about already checks 'new != old'.
> > > > > > Though I do like the rename, i.e. rename the trace function to
> > > > > > trace_kvm_ple_window_changed().
> > > > >
> > > > > Do you mean this one?
> > > > >
> > > > > if (vmx->ple_window != old)
> > > > > vmx->ple_window_dirty = true;
> > > >
> > > > Yep.
> > > >
> > > > > It didn't return, did it? :)
> > > >
> > > > You lost me. What's wrong with:
> > > >
> > > > if (vmx->ple_window != old) {
> > > > vmx->ple_window_dirty = true;
> > > > trace_kvm_ple_window_update(vcpu->vcpu_id, vmx_ple->window, old);
> > > > }
> > >
> > > Yes this looks fine to me. I'll switch.
> >
> > Btw, I noticed we have this:
> >
> > EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_ple_window);
> >
> > Is that trying to expose the tracepoints to the outter world? Is that
> > whole chunk of EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_*) really needed?
>
> It's needed to invoke tracepoints from VMX/SVM as the implementations live
> in kvm.ko. Same reason functions in x86.c and company need to be exported
> if they're called by VMX/SVM code.
Ah right. Then I assume it's pretty safe to change the symbol name here.
Thanks!
--
Peter Xu
prev parent reply other threads:[~2019-07-30 2:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 5:32 [PATCH 0/3] KVM: X86: Some tracepoint enhancements Peter Xu
2019-07-29 5:32 ` [PATCH 1/3] KVM: X86: Trace vcpu_id for vmexit Peter Xu
2019-07-29 16:28 ` Sean Christopherson
2019-07-30 1:49 ` Peter Xu
2019-07-31 21:49 ` Krish Sadhukhan
2019-07-29 5:32 ` [PATCH 2/3] KVM: X86: Remove tailing newline for tracepoints Peter Xu
2019-08-01 0:19 ` Krish Sadhukhan
2019-08-01 3:39 ` Wanpeng Li
2019-08-13 16:43 ` Peter Xu
2019-07-29 5:32 ` [PATCH 3/3] KVM: X86: Tune PLE Window tracepoint Peter Xu
2019-07-29 16:23 ` Sean Christopherson
2019-07-30 1:43 ` Peter Xu
2019-07-30 2:06 ` Sean Christopherson
2019-07-30 2:12 ` Peter Xu
2019-07-30 2:25 ` Peter Xu
2019-07-30 2:28 ` Sean Christopherson
2019-07-30 2:39 ` Peter Xu [this message]
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=20190730023904.GG19232@xz-x1 \
--to=peterx@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=zhexu@redhat.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).