[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api |
Date: |
Fri, 12 Apr 2013 10:41:06 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Apr 12, 2013 at 12:49:45PM +0800, liu ping fan wrote:
> On Thu, Apr 11, 2013 at 6:15 PM, Stefan Hajnoczi <address@hidden> wrote:
> > On Mon, Apr 01, 2013 at 04:20:32PM +0800, Liu Ping Fan wrote:
> >> @@ -51,7 +50,7 @@ bool vring_setup(Vring *vring, VirtIODevice *vdev, int n)
> >>
> >> void vring_teardown(Vring *vring)
> >> {
> >> - hostmem_finalize(&vring->hostmem);
> >> + memory_region_unref(vring->vring_mr);
> >> }
> >
> > dataplane keeps a reference to the vring. This prevents memory hot
> > unplug while the device is up. If this is a problem we'll have to
> > reduce the lifespan of the vring mapping.
> >
> hot unplug is rare case, maybe we can ignore the delay of device's finalize.
I thought about the vring more and I think we can keep the current
behavior. dataplane keeps the vring up when the device is active.
When the guest kernel/device driver resets the device then we unmap the
vring. It's reasonable that the guest needs to release the virtio
device before hot unplugging memory used for the vring :).
Therefore, in practice this behavior should be fine.
Stefan
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, (continued)
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, Stefan Hajnoczi, 2013/04/11
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, Paolo Bonzini, 2013/04/11
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, liu ping fan, 2013/04/11
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, Stefan Hajnoczi, 2013/04/12
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, Paolo Bonzini, 2013/04/12
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, liu ping fan, 2013/04/14
- Re: [Qemu-devel] [PATCH 2/5] hostmem: make hostmem global and RAM hotunplg safe, Paolo Bonzini, 2013/04/15
[Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api, Liu Ping Fan, 2013/04/01
[Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, Liu Ping Fan, 2013/04/01
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, li guang, 2013/04/02
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, Stefan Hajnoczi, 2013/04/11
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, liu ping fan, 2013/04/12
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, Stefan Hajnoczi, 2013/04/12
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, liu ping fan, 2013/04/12
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, Stefan Hajnoczi, 2013/04/16
- Re: [Qemu-devel] [PATCH 4/5] virtio-blk: release reference to RAM's memoryRegion, Paolo Bonzini, 2013/04/16
[Qemu-devel] [PATCH 5/5] hostmem: init/finalize hostmem listener, Liu Ping Fan, 2013/04/01