Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-16 Thread Stefan Hajnoczi
On Fri, Apr 12, 2013 at 05:05:41PM +0800, liu ping fan wrote: On Fri, Apr 12, 2013 at 4:45 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Apr 12, 2013 at 12:48:12PM +0800, liu ping fan wrote: On Thu, Apr 11, 2013 at 6:20 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Apr

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-16 Thread Paolo Bonzini
Il 16/04/2013 09:57, Stefan Hajnoczi ha scritto: So it sounds like unplug will not block and there is no guarantee the memory is actually unplugged when the monitor command completes. The memory region is only released when the last reference count holder lets go. This means that pending

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-12 Thread Stefan Hajnoczi
On Fri, Apr 12, 2013 at 12:48:12PM +0800, liu ping fan wrote: On Thu, Apr 11, 2013 at 6:20 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-12 Thread liu ping fan
On Fri, Apr 12, 2013 at 4:45 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Apr 12, 2013 at 12:48:12PM +0800, liu ping fan wrote: On Thu, Apr 11, 2013 at 6:20 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: From: Liu Ping Fan

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-11 Thread Stefan Hajnoczi
On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's memoryRegion when the req has been done. So we can avoid to call bdrv_drain_all() when RAM hot unplug. How does the hot unplug operation work

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-11 Thread liu ping fan
On Tue, Apr 2, 2013 at 1:58 PM, li guang lig.f...@cn.fujitsu.com wrote: 在 2013-04-01一的 16:20 +0800,Liu Ping Fan写道: From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's memoryRegion when the req has been done. do you mean unreference after req completed? Yes,

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-11 Thread liu ping fan
On Thu, Apr 11, 2013 at 6:20 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's memoryRegion when the req has been done. So we can avoid to call

[Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-01 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's memoryRegion when the req has been done. So we can avoid to call bdrv_drain_all() when RAM hot unplug. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- hw/dataplane/virtio-blk.c | 52

Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion

2013-04-01 Thread li guang
在 2013-04-01一的 16:20 +0800,Liu Ping Fan写道: From: Liu Ping Fan pingf...@linux.vnet.ibm.com virtio-blk will reference to RAM's memoryRegion when the req has been done. do you mean unreference after req completed? So we can avoid to call bdrv_drain_all() when RAM hot unplug.