qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mttcg@greensocs.com, "Mark Burton" <mark.burton@greensocs.com>,
	"Alexander Spyridakis" <a.spyridakis@virtualopensystems.com>,
	"Claudio Fontana" <Claudio.Fontana@huawei.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Alvise Rigo" <a.rigo@virtualopensystems.com>,
	"Jani Kokkonen" <Jani.Kokkonen@huawei.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"KONRAD Frédéric" <fred.konrad@greensocs.com>
Subject: Re: [Qemu-devel] Self-modifying test case for mttcg
Date: Wed, 22 Jul 2015 15:44:12 +0200	[thread overview]
Message-ID: <20150722134412.GC13441@hawk.localdomain> (raw)
In-Reply-To: <55AF953B.2040108@redhat.com>

On Wed, Jul 22, 2015 at 03:06:03PM +0200, Paolo Bonzini wrote:
> 
> 
> On 22/07/2015 14:38, Andrew Jones wrote:
> > I took a quick look at this and see issues with the test code. First,
> > you're spinning on a stack variable with this,
> > 
> >     /* Wait for our turn */
> >     while(next_cpu != cpu);
> > 
> > next_cpu needs to be global, and incremented atomically. I haven't gotten
> > around to adding atomic_add/inc yet, but it would easy, and I'm happy to
> > do it, even yet this week.
> 
> You can just use __sync_fetch_and_add(&next_cpu, 1) too, so we don't end
> up with too much arch-specific code.

Ah yes, I should take more advantage of gcc-builtins in general.

drew

  reply	other threads:[~2015-07-22 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 10:58 [Qemu-devel] Self-modifying test case for mttcg Alexander Spyridakis
2015-07-22 12:38 ` Andrew Jones
2015-07-22 13:06   ` Paolo Bonzini
2015-07-22 13:44     ` Andrew Jones [this message]
2015-07-22 15:01   ` Andrew Jones
2015-07-22 23:12   ` Alexander Spyridakis
2015-07-23 10:04     ` Andrew Jones
2015-07-23 14:42       ` Alexander Spyridakis

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=20150722134412.GC13441@hawk.localdomain \
    --to=drjones@redhat.com \
    --cc=Claudio.Fontana@huawei.com \
    --cc=Jani.Kokkonen@huawei.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=a.spyridakis@virtualopensystems.com \
    --cc=alex.bennee@linaro.org \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=mttcg@greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).