qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/8] dump-guest-memory: add basic "detach" su


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 3/8] dump-guest-memory: add basic "detach" support.
Date: Fri, 27 Nov 2015 11:14:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 27/11/2015 07:27, Peter Xu wrote:
> If embed the mr pointer into GuestPhyBlock, then we might need to
> ref/unref one MemoryRegion for multiple times (and I am not sure how
> many, maybe it could be a very big number especially the
> MemoryRegionSections are scattered?). Not sure whether it is more
> efficient.
> 
> For what I see, the number of MemoryRegions should be not big (<5 in
> my case). So even with O(N^2), it should merely like O(N). Not sure
> about this too.
> 
> Would like to hear more review comments from Paolo and others.
> 

Fam suggestion is a good one, ref'ing one MemoryRegion many times is not
a problem.

Also I noticed now that you do the dump_init in the main thread (using a
listener), so the RCU lock/unlock is not needed.  I don't know this code
very well.

It's worth adding a comment at the top of functions that are called from
a separate thread.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]