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-by: Umesh Deshpande <udesh...@redhat.com>
> > ---
> >  cpu-all.h     |    2 ++
> >  exec.c        |   19 +++++++++++++++++++
> >  qemu-common.h |    2 ++
> >  3 files changed, 23 insertions(+), 0 deletions(-)
> > 
> > diff --git a/cpu-all.h b/cpu-all.h
> > index 6b217a2..eab9803 100644
> > --- a/cpu-all.h
> > +++ b/cpu-all.h
> > @@ -21,6 +21,7 @@
> >  
> >  #include "qemu-common.h"
> >  #include "cpu-common.h"
> > +#include "qemu-thread.h"
> >  
> >  /* some important defines:
> >   *
> > @@ -932,6 +933,7 @@ typedef struct RAMBlock {
> >  } RAMBlock;
> >  
> >  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.

And on the lock ordering.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to