Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-25 Thread Avi Kivity
On 10/24/2012 08:56 AM, liu ping fan wrote: Oh, here is a bug, need unref. As to unbalanced refcount, it will be adopted for virtio-blk listener (not implement in this patchset) It is like cpu_physical_memory_map/unmap, the map will hold the unbalanced ref, and unmap release it. Those APIs

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-24 Thread liu ping fan
On Tue, Oct 23, 2012 at 8:36 PM, Avi Kivity a...@redhat.com wrote: On 10/23/2012 02:12 PM, Jan Kiszka wrote: On 2012-10-22 11:23, Liu Ping Fan wrote: Without biglock, we try to protect the mr by increase refcnt. If we can inc refcnt, go backward and resort to biglock. Another point is memory

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-24 Thread liu ping fan
On Wed, Oct 24, 2012 at 2:31 PM, liu ping fan qemul...@gmail.com wrote: On Tue, Oct 23, 2012 at 8:36 PM, Avi Kivity a...@redhat.com wrote: On 10/23/2012 02:12 PM, Jan Kiszka wrote: On 2012-10-22 11:23, Liu Ping Fan wrote: Without biglock, we try to protect the mr by increase refcnt. If we can

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-23 Thread Jan Kiszka
On 2012-10-22 11:23, Liu Ping Fan wrote: Without biglock, we try to protect the mr by increase refcnt. If we can inc refcnt, go backward and resort to biglock. Another point is memory radix-tree can be flushed by another thread, so we should get the copy of terminal mr to survive from such

Re: [Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-23 Thread Avi Kivity
On 10/23/2012 02:12 PM, Jan Kiszka wrote: On 2012-10-22 11:23, Liu Ping Fan wrote: Without biglock, we try to protect the mr by increase refcnt. If we can inc refcnt, go backward and resort to biglock. Another point is memory radix-tree can be flushed by another thread, so we should get the

[Qemu-devel] [patch v4 07/16] memory: make mmio dispatch able to be out of biglock

2012-10-22 Thread Liu Ping Fan
Without biglock, we try to protect the mr by increase refcnt. If we can inc refcnt, go backward and resort to biglock. Another point is memory radix-tree can be flushed by another thread, so we should get the copy of terminal mr to survive from such issue. Signed-off-by: Liu Ping Fan