On Tue, Aug 23, 2011 at 01:41:48PM +0200, Paolo Bonzini wrote:
> On 08/23/2011 11:17 AM, Marcelo Tosatti wrote:
> >typedef struct RAMList {
> > +QemuMutex mutex;
> >uint8_t *phys_dirty;
> >QLIST_HEAD(ram, RAMBlock) blocks;
> >QLIST_HEAD
On 08/23/2011 11:17 AM, Marcelo Tosatti wrote:
> >typedef struct RAMList {
> > +QemuMutex mutex;
> >uint8_t *phys_dirty;
> >QLIST_HEAD(ram, RAMBlock) blocks;
> >QLIST_HEAD(, RAMBlock) blocks_mru;
>
> A comment on what the mutex protects would be good.
Ind
On Tue, Aug 16, 2011 at 11:56:37PM -0400, Umesh Deshpande wrote:
> ramlist mutex is implemented to protect the RAMBlock list traversal in the
> migration thread from their addition/removal from the iothread.
>
> Signed-off-by: Umesh Deshpande
> ---
> cpu-all.h |2 ++
> exec.c|
On Tue, Aug 23, 2011 at 06:15:33AM -0300, Marcelo Tosatti wrote:
> On Tue, Aug 16, 2011 at 11:56:37PM -0400, Umesh Deshpande wrote:
> > ramlist mutex is implemented to protect the RAMBlock list traversal in the
> > migration thread from their addition/removal from the iothread.
> >
> > Signed-off-
On 08/19/2011 08:20 AM, Umesh Deshpande wrote:
Or, is it okay to convert all the ramblock list traversals in exec.c
(under iothread) to mru traversals, and probably it makes sense as the
original list was also maintained in the mru order, whereas the sequence
of blocks doesn't matter for the migr
On 08/17/2011 02:28 AM, Paolo Bonzini wrote:
On 08/16/2011 08:56 PM, Umesh Deshpande wrote:
@@ -3001,8 +3016,10 @@ void qemu_ram_free_from_ptr(ram_addr_t addr)
QLIST_FOREACH(block,&ram_list.blocks, next) {
if (addr == block->offset) {
+qemu_mutex_lock_ramlist();
On 08/16/2011 08:56 PM, Umesh Deshpande wrote:
@@ -3001,8 +3016,10 @@ void qemu_ram_free_from_ptr(ram_addr_t addr)
QLIST_FOREACH(block,&ram_list.blocks, next) {
if (addr == block->offset) {
+qemu_mutex_lock_ramlist();
QLIST_REMOVE(block, next);
ramlist mutex is implemented to protect the RAMBlock list traversal in the
migration thread from their addition/removal from the iothread.
Signed-off-by: Umesh Deshpande
---
cpu-all.h |2 ++
exec.c| 19 +++
qemu-common.h |2 ++
3 files changed, 23 insertions