qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Riku Voipio <riku.voipio@iki.fi>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] linux-user crashes on clone(2) when run on ppc host
Date: Thu, 18 Jun 2015 10:23:09 -0400	[thread overview]
Message-ID: <20150618142309.GA12305@flamenco> (raw)
In-Reply-To: <CAFEAcA-Rw+urpNKVfj=k1as+YaT72z+OAU5_gw0HyKsoLoMbaQ@mail.gmail.com>

On Thu, Jun 18, 2015 at 08:42:40 +0100, Peter Maydell wrote:
> > What data structures are you referring to? Are they ppc-specific?
> 
> None of the code generation data structures are locked at all --
> if two threads try to generate code at the same time they'll
> tend to clobber each other.

AFAICT tb_gen_code is called with a mutex held (the sequence is
mutex->tb_find_fast->tb_find_slow->tb_gen_code in cpu-exec.c)

The only call to tb_gen_code that in usermode is not holding
the lock is in cpu_breakpoint_insert->breakpoint_invalidate->
tb_invalidate_phys_page_range->tb_gen_code. I'm not using
gdb so I guess I cannot trigger this.

Am I missing something?

> On 17 June 2015 at 22:36, Emilio G. Cota <cota@braap.org> wrote:
> > I don't think this is a race because it also breaks when
> > run on a single core (with taskset -c 0).

As I said, this problem doesn't seem to be a race.

Thanks,

		Emilio

  reply	other threads:[~2015-06-18 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17  0:52 [Qemu-devel] linux-user crashes on clone(2) when run on ppc host Emilio G. Cota
2015-06-17  8:58 ` Peter Maydell
2015-06-17 21:36   ` Emilio G. Cota
2015-06-18  7:42     ` Peter Maydell
2015-06-18 14:23       ` Emilio G. Cota [this message]
2015-06-18 14:55         ` Peter Maydell
2015-06-18 18:36           ` Emilio G. Cota

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=20150618142309.GA12305@flamenco \
    --to=cota@braap.org \
    --cc=agraf@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).