Re: [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-22 Thread Marcelo Tosatti
On Mon, Nov 22, 2010 at 11:45:18AM +0800, Xiao Guangrong wrote: On 11/20/2010 12:11 AM, Marcelo Tosatti wrote: void kvm_flush_remote_tlbs(struct kvm *kvm) { + int dirty_count = atomic_read(kvm-tlbs_dirty); + + smp_mb(); if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))

Re: [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-22 Thread Marcelo Tosatti
On Mon, Nov 22, 2010 at 12:19:25PM -0200, Marcelo Tosatti wrote: On Mon, Nov 22, 2010 at 11:45:18AM +0800, Xiao Guangrong wrote: On 11/20/2010 12:11 AM, Marcelo Tosatti wrote: void kvm_flush_remote_tlbs(struct kvm *kvm) { +int dirty_count = atomic_read(kvm-tlbs_dirty);

Re: [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-21 Thread Xiao Guangrong
On 11/20/2010 12:11 AM, Marcelo Tosatti wrote: void kvm_flush_remote_tlbs(struct kvm *kvm) { +int dirty_count = atomic_read(kvm-tlbs_dirty); + +smp_mb(); if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) ++kvm-stat.remote_tlb_flush; +

[PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-19 Thread Xiao Guangrong
Quote from Avi: | I don't think we need to flush immediately; set a tlb dirty bit somewhere | that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page() | can consult the bit and force a flush if set. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

Re: [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-19 Thread Marcelo Tosatti
On Fri, Nov 19, 2010 at 05:05:38PM +0800, Xiao Guangrong wrote: Quote from Avi: | I don't think we need to flush immediately; set a tlb dirty bit somewhere | that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page() | can consult the bit and force a flush if set.