From: Andre Przywara <andre.przywara@amd.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "avi@redhat.com" <avi@redhat.com>,
"aurelien@aurel32.net" <aurelien@aurel32.net>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] resent: x86/cpuid: propagate further CPUID leafs when -cpu host
Date: Wed, 26 May 2010 12:52:29 +0200 [thread overview]
Message-ID: <4BFCFD6D.8090005@amd.com> (raw)
In-Reply-To: <4BFBCFF0.70506@codemonkey.ws>
Anthony Liguori wrote:
> On 05/25/2010 08:21 AM, Andre Przywara wrote:
>>> What's the benefit of exposing this information to the guest?
>> That is mostly to propagate the cache size and organization parameters
>> to the guest:
>>>> +/* safe CPUID leafs to propagate to guest if -cpu host is specified
>>>> + * Intel defined leafs:
>>>> + * Cache descriptors (0x02)
>>>> + * Deterministic cache parameters (0x04)
>>>> + * Monitor/MWAIT parameters (0x05)
>>>> + *
>>>> + * AMD defined leafs:
>>>> + * L1 Cache and TLB (0x05)
>>>> + * L2+L3 TLB (0x06)
>>>> + * LongMode address size (0x08)
>>>> + * 1GB page TLB (0x19)
>>>> + * Performance optimization (0x1A)
>>>> + */
>> Since at least L1 and L2 caches are mostly private to vCPUs, I see no
>> reason to disguise them.
>
> But in practice, what is it useful for? Just because we can expose it
> doesn't mean we should.
Beside the obvious high performance libraries (like the AMD ACML) also
JVMs (and probably other managed code runtimes) use the cache
information for optimization. Given the fact that we have a fairly large
range of actual L2 cache sizes (from 256KB to 6MB on Intel) the fixed
cache size that QEMU reports (1MB) is quite a bit off most of the times.
-cpu host is targeted to give the best performance to the user, with the
drawback of missing or very limited migration experience. So we should
expose as many features as possible.
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
prev parent reply other threads:[~2010-05-26 10:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 7:50 [Qemu-devel] [PATCH] resent: x86/cpuid: propagate further CPUID leafs when -cpu host Andre Przywara
2010-05-24 22:10 ` Anthony Liguori
2010-05-25 7:27 ` Avi Kivity
2010-05-25 13:21 ` Andre Przywara
2010-05-25 13:26 ` Anthony Liguori
2010-05-25 13:47 ` Avi Kivity
2010-05-26 10:52 ` Andre Przywara [this message]
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=4BFCFD6D.8090005@amd.com \
--to=andre.przywara@amd.com \
--cc=anthony@codemonkey.ws \
--cc=aurelien@aurel32.net \
--cc=avi@redhat.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).