From: 解壁伟 <xiebiwei@ict.ac.cn>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <514047B9.6010400@ict.ac.cn> (raw)
In-Reply-To: <20130313084540.GB14391@stefanha-thinkpad.muc.redhat.com>
I read the article again, and I get the answer to my question in that
paragraph.
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
>
next prev parent reply other threads:[~2013-03-13 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 9:34 [Qemu-devel] About the Thread model in Qemu【 Is it one thread per vcpu?】 解壁伟
2013-03-12 22:26 ` Laszlo Ersek
2013-03-13 8:59 ` 解壁伟
2013-03-13 8:45 ` Stefan Hajnoczi
2013-03-13 9:32 ` 解壁伟 [this message]
2013-03-13 9:51 ` Peter Maydell
2013-03-13 9:56 ` Laurent Desnogues
2013-03-13 12:21 ` Paolo Bonzini
2013-04-15 14:43 ` [Qemu-devel] Round robin of multi-vcpu in qemu 解壁伟
2013-04-23 1:25 ` 陳韋任 (Wei-Ren Chen)
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=514047B9.6010400@ict.ac.cn \
--to=xiebiwei@ict.ac.cn \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.