From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: doremi <doremishane@gmail.com>
Subject: Re: [Qemu-devel] Qemu threading support?
Date: Thu, 2 Apr 2009 11:46:31 +0000 [thread overview]
Message-ID: <200904021246.32389.paul@codesourcery.com> (raw)
In-Reply-To: <a0977c3a0904020043h403b5eaejf919841f8628c113@mail.gmail.com>
On Thursday 02 April 2009, doremi wrote:
> Hello,
>
> These days I have to add multi-threading support for Qemu (Performace
> is not important for me).
If performance is not important then why are you trying to do this? There's a
good chance that the synchronisation overhead will be greater than the
benefit of using multiple CPU cores. i.e. a multithreaded qemu will run
slower than the current single threaded code.
> But it's very complicated, could anybody do me a favor? Thanks
As you say, it's a hard problem. Try searching the mailing lists, this has
been discussed a several times before.
Most of qemu is not threadsafe, so needs to be locked appropriately. Chances
are the only thing you're realistically going to be able to run in parallel
is the actual translated code. Even then it's not straightforward because you
have to ensure MMIO callbacks get proper locking. You also have to make sure
that all atomicity, ordering and coherency guarantees provided by the guest
ISA are honored. Chances are that guest atomic operations will not be atomic
after translation, and the host does not provide the memory ordering and
coherency guarantees that the guest required. These problems can occur even
for the x86 on x86 because the guest may require strongly ordered regions via
PAT bits or MTRRs.
Paul
prev parent reply other threads:[~2009-04-02 11:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 7:43 [Qemu-devel] Qemu threading support? doremi
2009-04-02 11:46 ` Paul Brook [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=200904021246.32389.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=doremishane@gmail.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).