From: Fabien Chouteau <chouteau@adacore.com>
To: Roy Tam <roytam@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-stable@nongnu.org, jacob.kroon@gmail.com,
qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: Re: [Qemu-devel] [PATCH 1/2] win32: do not set CPU affinity
Date: Wed, 10 Apr 2013 10:26:22 +0200 [thread overview]
Message-ID: <5165222E.4020606@adacore.com> (raw)
In-Reply-To: <CAA=zYJbYj9xaG1prgpaA223Ufi16Fj--1J4KFE+=FqrdKgAzRA@mail.gmail.com>
Looks like I missed an important discussion once again :) In the future
don't hesitate to put me in copy for Windows and or IO loop subjects.
On 02/21/2013 09:13 AM, Roy Tam wrote:
> 2013/2/21 Roy Tam <roytam@gmail.com>:
>> 2013/2/21 Paolo Bonzini <pbonzini@redhat.com>:
>>> Il 21/02/2013 01:35, Roy Tam ha scritto:
>>>>>> QEMU system emulation has been thread-safe for a long time, and
>>>>>> setting the CPU affinity is hurting performance badly. Remove
>>>>>> the bogus code.
Actually it was not thread-safe on Windows because we don't have
signals. On Linux, cpu_signal() is executed in the TCG thread context,
on Windows, it's executed in IO thread context. This leads to memory
synchronization issues.
>>>>>>
>>>>>> Jacob Kroon reports that the time to boot his VxWorks image goes from
>>>>>> "3 minutes passed and I still haven't made it that far" to ~140s.
>>>>>>
>>>> Yes it does work better for fdostest.img, but when I tried to boot
>>>> ttylinux-i686-14.0.iso, qemu freezes after showing "loading vmlinuz
>>>> ..."
>>>>
>>>
>>> Did it work without the patch?
>>
>> Yes, at least linux kernel starts but stalls when hitting IO-APIC
>> thingy, with noapic boot switch it stalls after detecting ttyS0
>>
>> With patch, QEMU is unresponsive when loading vmlinuz (not even
>> showing "Decompressing Linux" message)
>
> Clarify that it boots fine sometimes, but when QEMU freezes, there is
> a thread busy-waiting(seems so):
> http://i.imgur.com/LUJjd8r.png
>
As I said in the patch set submitted yesterday, we've be through this
kind of problem already. And it was not easy to debug (to say the
least).
The freezes that your are observing is due to a bad memory
synchronization, between exit_request (global) and cpu->exit_request.
This is fixed by the second patch of my set "Ensure good ordering of
memory instruction in cpu_exec".
--
Fabien Chouteau
prev parent reply other threads:[~2013-04-10 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1361367811-13288-1-git-send-email-pbonzini@redhat.com>
[not found] ` <1361367811-13288-3-git-send-email-pbonzini@redhat.com>
2013-04-09 16:21 ` [Qemu-devel] [PATCH 2/2] qemu-timer: move timeBeginPeriod/timeEndPeriod to os-win32 Paolo Bonzini
2013-04-09 20:22 ` Stefan Weil
[not found] ` <1361367811-13288-2-git-send-email-pbonzini@redhat.com>
[not found] ` <CAA=zYJbN1RCPwd9hKHacFc8eFMHN=gy-bsDeboGj4yMUpXqpuQ@mail.gmail.com>
[not found] ` <5125D10A.5010609@redhat.com>
[not found] ` <CAA=zYJaUOGOTugjuFpRwBDZW1j5OTpwicMW8RZK_LzQJ_02KJA@mail.gmail.com>
[not found] ` <CAA=zYJbYj9xaG1prgpaA223Ufi16Fj--1J4KFE+=FqrdKgAzRA@mail.gmail.com>
2013-04-10 8:26 ` Fabien Chouteau [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=5165222E.4020606@adacore.com \
--to=chouteau@adacore.com \
--cc=jacob.kroon@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=roytam@gmail.com \
--cc=sw@weilnetz.de \
/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).