[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it |
Date: |
Thu, 26 Jul 2012 16:46:42 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 07/26/2012 04:21 PM, liu ping fan wrote:
> On Thu, Jul 26, 2012 at 9:15 PM, Avi Kivity <address@hidden> 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
- [Qemu-devel] [PATCH 0/5] prepare unplug out of protection of global lock, Liu Ping Fan, 2012/07/24
- [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, Liu Ping Fan, 2012/07/24
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, Paolo Bonzini, 2012/07/25
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, liu ping fan, 2012/07/26
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, Avi Kivity, 2012/07/26
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, liu ping fan, 2012/07/26
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, Avi Kivity, 2012/07/26
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it, liu ping fan, 2012/07/26
- Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it,
Avi Kivity <=
[Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching, Liu Ping Fan, 2012/07/24
Re: [Qemu-devel] [PATCH 2/5] exec.c: use refcnt to protect device during dispatching, Avi Kivity, 2012/07/25
[Qemu-devel] [PATCH 3/5] hotplug: introduce qdev_unplug_ack() to remove device from views, Liu Ping Fan, 2012/07/24