|
From: | 解壁伟 |
Subject: | Re: [Qemu-devel] About the Thread model in Qemu【 Is it one thread per vcpu?】 |
Date: | Wed, 13 Mar 2013 17:32:41 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
Thank you very much. As you've said, TCG's not thread-safe.Is it only the shared data structure(e.g TB) that prevent TCG to be thread-safe? I'm seeking a method to parallize TCG in order to parallize Qemu.
And,how do the multi-thread in kvm mode Qemu synchronize to each other? For some threads maybe excute faster or slower than others, how do they synchronize the clock with each other? Using a huge lock or a global clock?
I'll be appreciate if you can give me some hints for further exploration.For now, I need a emulator to emulate more cores efficiently.I want to analyze whether Qemu can be faster when it emulate more cores, while parallelism maybe a good choice.
puck 于 2013/3/13 16:45, Stefan Hajnoczi 写道:
On Tue, Mar 12, 2013 at 05:34:24PM +0800, 解壁伟 wrote:Hi there: I've read this an article discribe the thread model in Qemu. http://blog.vmsplice.net/2011/03/qemu-internals-overall-architecture-and.html Is there really one thread per vcpu in qemu? When I run the qemu using "-smp 16", I can see only two threads using "ps -xH"."Note that TCG is not thread-safe so even under the iothread model it multiplexes vcpus across a single QEMU thread. Only KVM can take advantage of per-vcpu threads." If you do not have -enable-kvm then you're probably using TCG. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |