From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Threading Qemu
Date: Wed, 28 May 2008 14:27:52 +0200 [thread overview]
Message-ID: <483D4FC8.5080708@bellard.org> (raw)
In-Reply-To: <483D0C78.8020406@qumranet.com>
Izik Eidus wrote:
> mixado@mod-x.com wrote:
>> Hi,
>>
>> To make use of all the host CPU cores I'm thinking of adding thread
>> support to Qemu.
>> The idea so far is to create one thread for each virtual CPU, and then
>> run a modified main_loop in each of these threads.
>> The first step would be to rewrite all the global variables like
>> first_cpu etc to make it more thread friendly, and make that run in the
>> current non-threaded version.
>>
>> Any hints or tips that I should keep in mind when attempting this? Has
>> thread support been worked on before but not completed?
>>
> it isn't about just give thread for each virtual CPU, you will need to take care that
> atomic operations will translate from one architecture to another architecture as atomic
> plus you will need to take care for memory barriers, and many more things
> (it looks very complex)
I confirm, the general case is quite complicated. It is simpler to begin
with an implementation where the host and guest CPUs have the same
memory ordering constraints (e.g. x86 on x86 case).
Fabrice.
next prev parent reply other threads:[~2008-05-28 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 6:31 [Qemu-devel] Threading Qemu mixado
2008-05-28 7:40 ` Izik Eidus
2008-05-28 12:27 ` Fabrice Bellard [this message]
2008-05-28 12:39 ` Jamie Lokier
2008-05-28 12:28 ` Jamie Lokier
2008-05-28 13:31 ` Paul Brook
-- strict thread matches above, loose matches on Subject: below --
2008-05-28 10:40 Mikael Regnell
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=483D4FC8.5080708@bellard.org \
--to=fabrice@bellard.org \
--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).