* 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. Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK