qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Threading Qemu


From: Fabrice Bellard
Subject: Re: [Qemu-devel] Threading Qemu
Date: Wed, 28 May 2008 14:27:52 +0200
User-agent: Thunderbird 2.0.0.5 (X11/20070727)

Izik Eidus wrote:
address@hidden 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]