qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Threading Qemu
@ 2008-05-28  6:31 mixado
  2008-05-28  7:40 ` Izik Eidus
  0 siblings, 1 reply; 7+ messages in thread
From: mixado @ 2008-05-28  6:31 UTC (permalink / raw)
  To: qemu-devel

<html><body>Hi,<br><br>To make use of all the host CPU cores I'm thinking of adding thread support to Qemu. <br>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. <br>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. <br><br>Any hints or tips that I should keep in mind when attempting this? Has thread support been worked on before but not completed?<br><br></body></html>

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [Qemu-devel] Threading Qemu
@ 2008-05-28 10:40 Mikael Regnell
  0 siblings, 0 replies; 7+ messages in thread
From: Mikael Regnell @ 2008-05-28 10:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: paul

<html><body>The current idea is to use mutexes at TB level, to avoid problems with atomic operations. Perhaps this won't give enough benefit, but it is the current plan. With this approach it's possible to go down to atomic level operation in the future.<br><br>I read in another thread that Paul Brook is planning to implement multithreading. <br>Paul: Do you have any more information on your approach?<br><br>BR,<br>/Micke<br><br>
<blockquote webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px;">
-------- Original Message --------<br>
Subject: Re: [Qemu-devel] Threading Qemu<br>
From: Izik Eidus &lt;izike@qumranet.com&gt;<br>
Date: Wed, May 28, 2008 12:40 am<br>
To: <a href="mailto:qemu-devel@nongnu.org">qemu-devel@nongnu.org</a><br>
<br>
<a href="http://email.secureserver.net/pcompose.php#Compose" onclick="Popup.composeWindow('pcompose.php?sendto=mixado%40mod-x.com'); return false;">mixado<b></b>@mod-x.com</a> wrote:<br>
&gt; Hi,<br>
&gt; <br>
&gt; To make use of all the host CPU cores I'm thinking of adding thread<br>
&gt; support to Qemu.<br>
&gt; The idea so far is to create one thread for each virtual CPU, and then<br>
&gt; run a modified main_loop in each of these threads.<br>
&gt; The first step would be to rewrite all the global variables like<br>
&gt; first_cpu etc to make it more thread friendly, and make that run in the<br>
&gt; current non-threaded version.<br>
&gt; <br>
&gt; Any hints or tips that I should keep in mind when attempting this? Has<br>
&gt; thread support been worked on before but not completed?<br>
&gt; <br>
it isn't about just give thread for each virtual CPU, you will need to take care that<br>
atomic operations will translate from one architecture to another architecture as atomic<br>
plus you will need to take care for memory barriers, and many more things<br>
(it looks very complex)<br>
<br>
<br>
-- <br>
woof.<br>
<br>
<br>

</blockquote></body></html>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-28 13:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-28  6:31 [Qemu-devel] Threading Qemu mixado
2008-05-28  7:40 ` Izik Eidus
2008-05-28 12:27   ` Fabrice Bellard
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

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).