On 07/26/2012 04:21 PM, liu ping fan wrote:
> On Thu, Jul 26, 2012 at 9:15 PM, Avi Kivity <a...@redhat.com> wrote:
>> On 07/26/2012 04:14 PM, liu ping fan wrote:
>>>>
>>>> From the description above, I don't see why it can't be a mutex.
>>>>
>>> Searching in the device tree (or MemoryRegion view) can be often in
>>> parallel, especially in mmio-dispatch code path
>>
>> In mmio dispatch we have a pointer to the object, we don't need to
>> search anything.  Is device tree search a hot path?
>>
> I think, we need lock to protect searching --phys_page_find()  from
> deleter--DeviceClass:unmap,  so rwlock?

Better a lock on phys_map (because it is easily replaced by rcu, later).

I think phys_map is also better isolated, so it will be easier to find
all the placed that need protection and to avoid deadlock.


-- 
error compiling committee.c: too many arguments to function



Reply via email to