Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-13 Thread Marcelo Tosatti
On Thu, Aug 09, 2012 at 03:28:44PM +0800, liu ping fan wrote: > On Wed, Aug 8, 2012 at 5:13 PM, Avi Kivity wrote: > > On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > >> From: Liu Ping Fan > >> > >> Using mem_map_lock to protect among updaters. So we can get the intact > >> snapshot of mem topology

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-09 Thread liu ping fan
On Thu, Aug 9, 2012 at 4:24 PM, Avi Kivity wrote: > On 08/09/2012 10:28 AM, liu ping fan wrote: >>> >>> Seems to me that nothing in memory.c can susceptible to races. It must >>> already be called under the big qemu lock, and with the exception of >>> mutators (memory_region_set_*), changes aren'

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-09 Thread Blue Swirl
On Thu, Aug 9, 2012 at 7:28 AM, liu ping fan wrote: > On Thu, Aug 9, 2012 at 3:17 AM, Blue Swirl wrote: >> On Wed, Aug 8, 2012 at 6:25 AM, Liu Ping Fan wrote: >>> From: Liu Ping Fan >>> >>> Using mem_map_lock to protect among updaters. So we can get the intact >>> snapshot of mem topology -- Fl

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-09 Thread Avi Kivity
On 08/09/2012 10:28 AM, liu ping fan wrote: >> >> Seems to me that nothing in memory.c can susceptible to races. It must >> already be called under the big qemu lock, and with the exception of >> mutators (memory_region_set_*), changes aren't directly visible. >> > Yes, what I want to do is "prepa

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-09 Thread liu ping fan
On Wed, Aug 8, 2012 at 5:13 PM, Avi Kivity wrote: > On 08/08/2012 09:25 AM, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> Using mem_map_lock to protect among updaters. So we can get the intact >> snapshot of mem topology -- FlatView & radix-tree. >> >> Signed-off-by: Liu Ping Fan >> --- >> ex

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-09 Thread liu ping fan
On Thu, Aug 9, 2012 at 3:17 AM, Blue Swirl wrote: > On Wed, Aug 8, 2012 at 6:25 AM, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> Using mem_map_lock to protect among updaters. So we can get the intact >> snapshot of mem topology -- FlatView & radix-tree. >> >> Signed-off-by: Liu Ping Fan >> -

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-08 Thread Blue Swirl
On Wed, Aug 8, 2012 at 6:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Using mem_map_lock to protect among updaters. So we can get the intact > snapshot of mem topology -- FlatView & radix-tree. > > Signed-off-by: Liu Ping Fan > --- > exec.c |3 +++ > memory.c | 22 +++

Re: [PATCH 04/15] memory: MemoryRegion topology must be stable when updating

2012-08-08 Thread Avi Kivity
On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > Using mem_map_lock to protect among updaters. So we can get the intact > snapshot of mem topology -- FlatView & radix-tree. > > Signed-off-by: Liu Ping Fan > --- > exec.c |3 +++ > memory.c | 22 ++