From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
kvm <kvm@vger.kernel.org>, "Radim Krčmář" <rkrcmar@redhat.com>,
"Wanpeng Li" <wanpeng.li@hotmail.com>,
"Jim Mattson" <jmattson@google.com>
Subject: Re: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory
Date: Wed, 29 Nov 2017 10:13:32 +0100 [thread overview]
Message-ID: <b03a351c-764c-5132-7efa-a63328d3e8e4@redhat.com> (raw)
In-Reply-To: <CANRm+CwsNpDwSeDmVUG0dgyRNso2_NVZoo2Vs=05RuC7pkB+ZA@mail.gmail.com>
On 29/11/2017 09:51, Wanpeng Li wrote:
> 2017-11-29 16:48 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>> On 29/11/2017 07:07, Wanpeng Li wrote:
>>> From: Wanpeng Li <wanpeng.li@hotmail.com>
>>>
>>> MSR_IA32_DEBUGCTLMSR is zeroed on VMEXIT, so it is saved/restored
>>> each time during world switch. Jim from Google pointed out that
>>> when running schbench in L2, vmx_vcpu_run will occupy 4% cpu time,
>>> and the 25% of vmx_vcpu_run cpu time is occupied by get_debugctlmsr().
>>> This patch caches the host IA32_DEBUGCTL MSR and saves/restores
>>> the host IA32_DEBUGCTL msr when guest/host switches to avoid to
>>> save/restore each time during world switch.
>>>
>>> Suggested-by: Jim Mattson <jmattson@google.com>
>>> Cc: Jim Mattson <jmattson@google.com>
>>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>>> Cc: Radim Krčmář <rkrcmar@redhat.com>
>>> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
>>
>> The update_debugctlmsr should stay in vmx_vcpu_run so that tracing
>> features work correctly. However, the get_debugctlmsr indeed can be
>
> The tracing can't run except vCPU is schedule out, so why
> update_debugctlmsr should stay in vmx_vcpu_run?
For example your patch is disabling BTS (branch trace store) after the
first vmexit, isn't it?
Thanks,
Paolo
next prev parent reply other threads:[~2017-11-29 9:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 6:07 Wanpeng Li
2017-11-29 8:48 ` Paolo Bonzini
2017-11-29 8:51 ` Wanpeng Li
2017-11-29 9:13 ` Paolo Bonzini [this message]
2017-11-29 9:20 ` Wanpeng Li
2017-11-29 18:20 ` Andi Kleen
2017-11-29 19:05 ` Jim Mattson
2017-11-29 20:56 ` Andi Kleen
2017-11-29 22:26 ` Paolo Bonzini
2017-11-29 22:45 ` Andi Kleen
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=b03a351c-764c-5132-7efa-a63328d3e8e4@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
--cc=wanpeng.li@hotmail.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
all inboxes | Powered by JetHome®