From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH A] KVM: Simplify kvm->tlbs_dirty handling Date: Wed, 19 Feb 2014 09:40:16 +0900 Message-ID: <5303FD70.40505@lab.ntt.co.jp> References: <20140218172150.7723d3a5.yoshikawa_takuya_b1@lab.ntt.co.jp> <20140218172247.ca61f503.yoshikawa_takuya_b1@lab.ntt.co.jp> <53032B3C.5000403@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Xiao Guangrong , gleb@kernel.org, pbonzini@redhat.com Return-path: Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]:33704 "EHLO tama50.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbaBSAia (ORCPT ); Tue, 18 Feb 2014 19:38:30 -0500 In-Reply-To: <53032B3C.5000403@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: (2014/02/18 18:43), Xiao Guangrong wrote: > On 02/18/2014 04:22 PM, Takuya Yoshikawa wrote: >> When this was introduced, kvm_flush_remote_tlbs() could be called >> without holding mmu_lock. It is now acknowledged that the function >> must be called before releasing mmu_lock, and all callers have already >> been changed to do so. >> > > I have already posted the patch to moving flush tlb out of mmu-lock > when do dirty tracking: > KVM: MMU: flush tlb out of mmu lock when write-protect the sptes Yes, I had your patch in mind, so made patch B. > > Actually some patches (patch 1 - patch 4) in that patchset can be > pickup-ed separately and i should apologize for the patchset was > not updated for a long time since i was busy on other development. Looking forward to seeing that work again! > > And moving tlb flush out of mmu-lock should be going on in the > future, so i think the B patch is more acceptable. > Maybe. Some time ago, someone working on non-x86 stuff asked us why smp_mb() and cmpxchg() were used there. So a brief comment which points them to the note on sync_page() will be helpful. Takuya