From: Xiao Guangrong <guangrong.xiao@linux.intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Lan Tianyu <tianyu.lan@intel.com>,
gleb@kernel.org, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page()
Date: Fri, 4 Mar 2016 21:48:22 +0800 [thread overview]
Message-ID: <56D99226.8060208@linux.intel.com> (raw)
In-Reply-To: <56D9417E.4000206@redhat.com>
On 03/04/2016 04:04 PM, Paolo Bonzini wrote:
> On 04/03/2016 02:35, Lan Tianyu wrote:
>> The following kvm_flush_remote_tlbs() will call smp_mb() inside and so
>> remove smp_mb() here.
>>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>> arch/x86/kvm/mmu.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
>> index a54ecd9..6315416 100644
>> --- a/arch/x86/kvm/mmu.c
>> +++ b/arch/x86/kvm/mmu.c
>> @@ -2383,12 +2383,6 @@ static void kvm_mmu_commit_zap_page(struct kvm *kvm,
>> return;
>>
>> /*
>> - * wmb: make sure everyone sees our modifications to the page tables
>> - * rmb: make sure we see changes to vcpu->mode
>> - */
>> - smp_mb();
>> -
>> - /*
>> * Wait for all vcpus to exit guest mode and/or lockless shadow
>> * page table walks.
>> */
>>
>
> kvm_flush_remote_tlbs loads kvm->tlbs_dirty before issuing the memory
> barrier. I think it's okay if the load is done earlier, but I'd like
> Guangrong to take a look.
Yes, It looks good to me, but please keep the comment.
Thanks!
prev parent reply other threads:[~2016-03-04 13:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 1:35 [PATCH] KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page() Lan Tianyu
2016-03-04 7:21 ` Thomas Gleixner
2016-03-04 7:12 ` Lan Tianyu
2016-03-04 8:49 ` Paolo Bonzini
2016-03-08 8:36 ` Lan Tianyu
2016-03-08 15:27 ` Paolo Bonzini
2016-03-09 7:18 ` Lan Tianyu
2016-03-10 17:07 ` Paolo Bonzini
2016-03-10 18:08 ` Xiao Guangrong
2016-03-10 14:40 ` Xiao Guangrong
2016-03-10 15:26 ` Paolo Bonzini
2016-03-10 15:31 ` Paolo Bonzini
2016-03-10 15:45 ` Xiao Guangrong
2016-03-10 16:04 ` Paolo Bonzini
2016-03-10 17:57 ` Xiao Guangrong
2016-03-11 1:13 ` Lan Tianyu
2016-03-04 8:04 ` Paolo Bonzini
2016-03-04 13:48 ` Xiao Guangrong [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=56D99226.8060208@linux.intel.com \
--to=guangrong.xiao@linux.intel.com \
--cc=gleb@kernel.org \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=tianyu.lan@intel.com \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.