From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFhJq-0006NO-Bh for qemu-devel@nongnu.org; Wed, 13 Mar 2013 04:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFhJi-0008Fp-Re for qemu-devel@nongnu.org; Wed, 13 Mar 2013 04:45:54 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:41155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFhJi-0008Fj-EN for qemu-devel@nongnu.org; Wed, 13 Mar 2013 04:45:46 -0400 Received: by mail-we0-f169.google.com with SMTP id t11so749234wey.14 for ; Wed, 13 Mar 2013 01:45:45 -0700 (PDT) Date: Wed, 13 Mar 2013 09:45:40 +0100 From: Stefan Hajnoczi Message-ID: <20130313084540.GB14391@stefanha-thinkpad.muc.redhat.com> References: <513EF6A0.4000601@ict.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <513EF6A0.4000601@ict.ac.cn> Subject: Re: [Qemu-devel] =?utf-8?q?About_the_Thread_model_in_Qemu=E3=80=90_Is?= =?utf-8?q?_it_one_thread_per_vcpu=3F=E3=80=91?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?6Kej5aOB5Lyf?= Cc: qemu-devel@nongnu.org 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