qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: 陳韋任 <chenwj@iis.sinica.edu.tw>
Cc: qemu-devel <qemu-devel@nongnu.org>, Xin Tong <xerox.time.tech@gmail.com>
Subject: Re: [Qemu-devel] multiprocessor on kvm
Date: Tue, 8 Nov 2011 12:23:26 +0000	[thread overview]
Message-ID: <CAJSP0QWXL2k-xMvGz_85cnwDdSSzCLGai+mOmEpOLeszpxUHxw@mail.gmail.com> (raw)
In-Reply-To: <20111108121056.GA96832@cs.nctu.edu.tw>

On Tue, Nov 8, 2011 at 12:10 PM, 陳韋任 <chenwj@iis.sinica.edu.tw> wrote:
> On Tue, Nov 08, 2011 at 08:04:44PM +0800, 陳韋任 wrote:
>> > I am wondering that when one uses qemu with kvm. How many cores are
>> > exposed and available to the guest os ( assuming the host has 4 cores
>> > ). is this configurable ?
>>
>>   QEMU provides "-smp" option, but those virtual cpus are scheduled in
>> round-robin fashion. In other words, it's not real parallelism. I don't
>> know if there is any difference with kvm enabled.
>
>  IIRC, kvm uses QEMU for device emulation only. Those virtual cpus are
> ran on physical cpus simultaneously.

Right, qemu -enable-kvm will run a thread for each vCPU.  So you get
true SMP parallelism.

QEMU without KVM mode, on the other hand, does round-robin scheduling
of vCPUs and does not take advantage of multiprocessor hosts.

Stefan

  reply	other threads:[~2011-11-08 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 11:55 [Qemu-devel] multiprocessor on kvm Xin Tong
2011-11-08 12:04 ` 陳韋任
2011-11-08 12:10   ` 陳韋任
2011-11-08 12:23     ` Stefan Hajnoczi [this message]
2011-11-08 12:37       ` Xin Tong
2011-11-08 13:08         ` 陳韋任
2011-11-09  2:45           ` Dong Xu Wang
2011-11-09  2:50             ` 陳韋任
2011-11-08 14:21         ` Xin Tong

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=CAJSP0QWXL2k-xMvGz_85cnwDdSSzCLGai+mOmEpOLeszpxUHxw@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=chenwj@iis.sinica.edu.tw \
    --cc=qemu-devel@nongnu.org \
    --cc=xerox.time.tech@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 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).