[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion |
Date: |
Wed, 08 Aug 2012 12:20:20 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 08/08/2012 09:25 AM, Liu Ping Fan wrote:
> From: Liu Ping Fan <address@hidden>
>
> Using refcnt for mr, so we can separate mr's life cycle management
> from refered object.
> When mr->ref 0->1, inc the refered object.
> When mr->ref 1->0, dec the refered object.
>
> The refered object can be DeviceStae, another mr, or other opaque.
Please explain the motivation more fully.
Usually a MemoryRegion will be embedded within some DeviceState, or its
lifecycle will be managed by the DeviceState. So long as we keep the
DeviceState alive all associated MemoryRegions should be alive as well.
Why not do this directly?
--
error compiling committee.c: too many arguments to function
- Re: [Qemu-devel] [PATCH 04/15] memory: MemoryRegion topology must be stable when updating, (continued)
Re: [Qemu-devel] [PATCH 04/15] memory: MemoryRegion topology must be stable when updating, Blue Swirl, 2012/08/08
[Qemu-devel] [PATCH 05/15] memory: introduce life_ops to MemoryRegion, Liu Ping Fan, 2012/08/08
[Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion, Liu Ping Fan, 2012/08/08
- Re: [Qemu-devel] [PATCH 06/15] memory: use refcnt to manage MemoryRegion,
Avi Kivity <=
[Qemu-devel] [PATCH 10/15] memory: change tcg related code to using PhysMap, Liu Ping Fan, 2012/08/08
[Qemu-devel] [PATCH 09/15] memory: prepare flatview and radix-tree for rcu style access, Liu Ping Fan, 2012/08/08
Re: [Qemu-devel] [PATCH 09/15] memory: prepare flatview and radix-tree for rcu style access, Blue Swirl, 2012/08/08