From: Mohammed Gamal <m.gamal005@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] CPU topology and hyperthreading
Date: Thu, 17 Mar 2016 16:19:52 +0100 [thread overview]
Message-ID: <CAC-1Ebai123Kkk32=eDprDrHffaeMyLJSXr5ZaGHRrhui7nmhQ@mail.gmail.com> (raw)
Hi All,
I have a question regarding the way CPU topology is exposed to the guest.
On a 4-core Amazon AWS VM I can see the CPU topology exposed to the
guest in the following manner:
# lstopo
Machine (7480MB)
Socket L#0 + L3 L#0 (25MB)
L2 L#0 (256KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0
PU L#0 (P#0)
PU L#1 (P#2)
L2 L#1 (256KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1
PU L#2 (P#1)
PU L#3 (P#3)
[...]
Now trying to emulate this topology in qemu/kvm using the following
command line options:
-cpu Haswell,+ht -smp 4,sockets=1,cores=2,maxcpus=64,threads=2
as well as
-cpu kvm64,+ht -smp 4,sockets=1,cores=2,maxcpus=64,threads=2
Shows me something like this:
# lstopo
Machine (1870MB)
Socket L#0
L2 L#0 (4096KB) + Core L#0
L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0)
L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1)
L2 L#1 (4096KB) + Core L#1
L1d L#2 (32KB) + L1i L#2 (32KB) + PU L#2 (P#2)
L1d L#3 (32KB) + L1i L#3 (32KB) + PU L#3 (P#3)
[...]
In other words, qemu exposes each hyperthread as if it has its own L1
data and instruction caches. Should the be a correct behavior?
In all cases, what gets exposed in the guests's /proc/cpuinfo would be
the same, but I wonder why the topology is different?
Regards,
Mohammed
next reply other threads:[~2016-03-17 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 15:19 Mohammed Gamal [this message]
2016-03-21 10:39 ` [Qemu-devel] CPU topology and hyperthreading Mohammed Gamal
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='CAC-1Ebai123Kkk32=eDprDrHffaeMyLJSXr5ZaGHRrhui7nmhQ@mail.gmail.com' \
--to=m.gamal005@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).