qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 6/6] mem: change tcg code to rcu style


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v1 6/6] mem: change tcg code to rcu style
Date: Wed, 29 May 2013 11:03:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 29/05/2013 11:00, liu ping fan ha scritto:
>> Remember that this code is running under the BQL, so there is no need to
>> protect the TLB flushes otherwise.  There is also no need to do anything
> 
> Do you mean that cpu_exec() can not be out of BQL like kvm path?  If
> it is true, then there is no changes needed for tcg code, right?

Indeed.  When/if a fine-grained lock is introduced, it will protect TLB
accesses vs. TLB flushes.  For now, the BQL will do.

Making TCG multi-threaded is a wholly different problem, and a superset
of what's needed for KVM.

(Xen instead is almost the same, only the mapcache has to be protected
by its own mutex).

>> as long as you ref the regions that are entered in the map, and unref
>> them when you destroy the map.  Those refs will protect TCG's TLB too.
>>
> Worry about whether the TLB is the right index in the right
> phys_sections, if the mem topology changes between tlb_set_page() and
> instruction emulated.

That's not possible because of BQL protection.

>> In the end, all of TCG's execution consists of a large RCU critical section.
>
> Even stronger? If it runs with BQL protection.

Yes.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]