Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Gonglei (Arei)
> -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Friday, February 21, 2014 8:10 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Juan Quintela; owass...@redhat.com; > chenliang (T) > Subject: Re: [PATCH v2] XBZRLE: Fix qemu crash when resize the x

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Hi, > > > +static void XBZRLE_cache_lock(void) > > > +{ > > > +qemu_mutex_lock(&XBZRLE.lock); > > > +} > > > + > > > +static void XBZRLE_cache_unlock(void) > > > +{ > > > +qemu_mutex_unlock(&XBZRLE.lock); > > > +} > > > + > > > > You m

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Friday, February 21, 2014 7:04 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Juan Quintela; owass...@redhat.com; > chenliang (T) > Subject: Re: [PATCH v2] XBZRLE: Fix qemu crash when resize

Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-21 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Resizing the xbzrle cache during migration causes qemu-crash, > because the main-thread and migration-thread modify the xbzrle > cache size concurrently without lock-protection. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > Chan

[Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache

2014-02-20 Thread Gonglei (Arei)
Resizing the xbzrle cache during migration causes qemu-crash, because the main-thread and migration-thread modify the xbzrle cache size concurrently without lock-protection. Signed-off-by: ChenLiang Signed-off-by: Gonglei --- Changes against the previous version: *Remove function cache_max_num_