From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lan Tianyu Subject: Re: [PATCH] KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page() Date: Fri, 04 Mar 2016 15:12:14 +0800 Message-ID: <56D9354E.9040908@intel.com> References: <1457055312-27067-1-git-send-email-tianyu.lan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: gleb@kernel.org, pbonzini@redhat.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Thomas Gleixner Return-path: Received: from mga02.intel.com ([134.134.136.20]:43668 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbcCDH2N (ORCPT ); Fri, 4 Mar 2016 02:28:13 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 2016=E5=B9=B403=E6=9C=8804=E6=97=A5 15:21, Thomas Gleixner wrote: > On Fri, 4 Mar 2016, Lan Tianyu wrote: >=20 >> The following kvm_flush_remote_tlbs() will call smp_mb() inside and = so >> remove smp_mb() here. >> >> Signed-off-by: Lan Tianyu >> --- >> 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 kv= m *kvm, >> return; >> =20 >> /* >> - * wmb: make sure everyone sees our modifications to the page tabl= es >> - * rmb: make sure we see changes to vcpu->mode >=20 > You want to leave the comment explaining the memory barriers and tell= that > kvm_flush_remote_tlbs() contains the smp_mb(). That sounds more reasonable. Will update. Thanks. >=20 >> - */ >> - smp_mb(); >> - >> - /* >> * Wait for all vcpus to exit guest mode and/or lockless shadow >> * page table walks. >> */ >> --=20 >> 1.8.4.rc0.1.g8f6a3e5.dirty >> >> --=20 Best regards Tianyu Lan