All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Alexander Graf <agraf@suse.de>
Cc: Glauber Costa <glommer@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: [PATCH] fix smp with tcg mode and --enable-io-thread
Date: Tue, 22 Jun 2010 09:59:01 +0200	[thread overview]
Message-ID: <4C206D45.6090401@web.de> (raw)
In-Reply-To: <C23D2D6B-92C1-4139-9D09-E5C0AFDFF843@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

Alexander Graf wrote:
> On 22.06.2010, at 00:13, Jan Kiszka wrote:
> 
>> Jan Kiszka wrote:
>>> And there is some race that cause a lock up in qemu_mutex_lock_iothread
>>> after a while (the cpu_unlink_tb seems to race with the linking - just a
>>> guess so far).
>> This seems to fix a long-standing race between cpu_exec and
>> signal-driven cpu_unlink_tb:
>>
>> diff --git a/cpu-exec.c b/cpu-exec.c
>> index 026980a..bfc34e4 100644
>> --- a/cpu-exec.c
>> +++ b/cpu-exec.c
>> @@ -599,8 +598,9 @@ int cpu_exec(CPUState *env1)
>>                    TB, but before it is linked into a potentially
>>                    infinite loop and becomes env->current_tb. Avoid
>>                    starting execution if there is a pending interrupt. */
>> -                if (!unlikely (env->exit_request)) {
>> -                    env->current_tb = tb;
>> +                env->current_tb = tb;
>> +                asm("");
> 
> This is just barrier(), no?
> 

Yes, thoughtlessly copied from other places in cpu-exec.c. Guess it's
time to define this properly in qemu-barriers.h, also clobbering "memory".

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

      reply	other threads:[~2010-06-22  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 16:37 [Qemu-devel] smp broken in tcg mode with --enable-io-thread? Jan Kiszka
2010-06-18 19:53 ` Anthony Liguori
2010-06-21 19:31   ` [Qemu-devel] [PATCH] fix smp with tcg mode and --enable-io-thread Marcelo Tosatti
2010-06-21 20:25     ` [Qemu-devel] " Jan Kiszka
2010-06-21 20:58       ` Jan Kiszka
2010-06-21 23:06         ` Marcelo Tosatti
2010-06-22  8:06           ` Jan Kiszka
2010-06-23  7:42             ` Jan Kiszka
2010-06-23 16:19               ` Anthony Liguori
2010-06-21 22:13       ` Jan Kiszka
2010-06-21 22:25         ` Alexander Graf
2010-06-22  7:59           ` Jan Kiszka [this message]

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=4C206D45.6090401@web.de \
    --to=jan.kiszka@web.de \
    --cc=agraf@suse.de \
    --cc=glommer@redhat.com \
    --cc=mtosatti@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 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.