[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: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache |
Date: |
Fri, 21 Feb 2014 12:10:17 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
* 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.
Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK