[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrl
|
From: |
Gonglei (Arei) |
|
Subject: |
Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache |
|
Date: |
Fri, 21 Feb 2014 13:32:11 +0000 |
> -----Original Message-----
> From: Dr. David Alan Gilbert [mailto:address@hidden
> Sent: Friday, February 21, 2014 8:10 PM
> To: Gonglei (Arei)
> Cc: address@hidden; Juan Quintela; address@hidden;
> chenliang (T)
> Subject: Re: [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache
>
> * Gonglei (Arei) (address@hidden) 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 / address@hidden / Manchester, UK
Best regards,
-Gonglei