Re: KVM: Questions and comments on make_all_cpus_request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Jan 2013 19:43:40 -0500
Christoffer Dall <cdall@xxxxxxxxxxxxxxx> wrote:

> @@ -201,9 +222,13 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
>  {
>  	long dirty_count = kvm->tlbs_dirty;
>  
> -	smp_mb();
> +	smp_mb(); /* TODO: Someone should explain this! */
>  	if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
>  		++kvm->stat.remote_tlb_flush;
> +	/*
> +	 * TODO: Someone should explain this, why is it a cmpxchg, what
> +	 * happens if the dirty is different from dirty_count?
> +	 */
>  	cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
>  }

If it's different from the old value, that means another
attempt which forces us to care about TLBs has been done?

So I think making tlbs_dirty 0 is safe only when it's not
changed during executing this function.

	Takuya
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux