> -----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 xbzrle cache
> 
> * Gonglei (Arei) (arei.gong...@huawei.com) wrote:
> > Hi,
> 
> <snip>
> 
> > > > +static void XBZRLE_cache_lock(void)
> > > > +{
> > > > +    qemu_mutex_lock(&XBZRLE.lock);
> > > > +}
> > > > +
> > > > +static void XBZRLE_cache_unlock(void)
> > > > +{
> > > > +    qemu_mutex_unlock(&XBZRLE.lock);
> > > > +}
> > > > +
> > >
> > > You might want to make these only bother with the lock if xbzrle is 
> > > enabled
> > > - however actually, I think it's probably just best to keep them as is,
> > > and simple.
> > To be honest, we can't follow your meaning. Can you explain it in detail.
> 
> These two functions are called from a few places, including ram_save_block
> even if xbzrle isn't enabled; I was just suggesting you might not want
> to check the lock if xbzrle is disabled; however, I think it's simpler
> to leave it as is, and doubt the overhead is worth the complexity.

I see, thank you so much, Dave.
> 
> Dave
> --
> Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Best regards,
-Gonglei

Reply via email to