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 pend

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 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 > >> wrote: > >> > On Mon, Apr 01, 2013 at 04:20:33PM +0

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 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 wrote: >> > On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: >> >> From: Liu Ping Fan >> >> >> >> virtio-blk wi

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 wrote: > > On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: > >> From: Liu Ping Fan > >> > >> virtio-blk will reference to RAM's memoryRegion when the req has been > >> do

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 wrote: > On Mon, Apr 01, 2013 at 04:20:33PM +0800, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> 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

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 wrote: > 在 2013-04-01一的 16:20 +0800,Liu Ping Fan写道: >> From: Liu Ping Fan >> >> virtio-blk will reference to RAM's memoryRegion when the req has been >> done. > > do you mean unreference after req completed? > Yes, should s/reference/unreference/ >> So

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 > > 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 without bdrv_drain_all()? In

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 > > 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. > > Signed-off-by: Liu Ping Fan > -

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

2013-04-01 Thread Liu Ping Fan
From: Liu Ping Fan 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 --- hw/dataplane/virtio-blk.c | 52 ++-- 1 files changed, 40 inser