All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "chenliang (T)" <chenliang88@huawei.com>,
	"owasserm@redhat.com" <owasserm@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache
Date: Fri, 21 Feb 2014 12:10:17 +0000	[thread overview]
Message-ID: <20140221121017.GD2483@work-vm> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020815C824A@SZXEMA503-MBS.china.huawei.com>

* Gonglei (Arei) (arei.gonglei@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 / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2014-02-21 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21  2:14 [Qemu-devel] [PATCH v2] XBZRLE: Fix qemu crash when resize the xbzrle cache Gonglei (Arei)
2014-02-21 11:03 ` Dr. David Alan Gilbert
2014-02-21 11:59   ` Gonglei (Arei)
2014-02-21 12:10     ` Dr. David Alan Gilbert [this message]
2014-02-21 13:32       ` Gonglei (Arei)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140221121017.GD2483@work-vm \
    --to=dgilbert@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=chenliang88@huawei.com \
    --cc=owasserm@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.