xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xen.org
Subject: Re: OVMF very slow on AMD
Date: Mon, 18 Jul 2016 16:09:30 +0100	[thread overview]
Message-ID: <20160718150930.GD1835@perard.uk.xensource.com> (raw)
In-Reply-To: <20160715134831.GB16867@char.us.oracle.com>

On Fri, Jul 15, 2016 at 09:48:31AM -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Jul 14, 2016 at 04:53:07PM +0100, Anthony PERARD wrote:
> > So, this loop takes about 1 minute on my AMD machine (AMD Opteron(tm)
> > Processor 4284), and less that 1 second on an Intel machine.
> > If I compile OVMF as a 32bit binary, the loop is faster, but still takes
> > about 30s on AMD. (that's true for both OvmfIa32 and OvmfIa32X64 which
> > is 32bit bootstrap, but can start 64bit OS.)
> > Another thing, I tried the same binary (64bit) with KVM, and OVMF seems
> > fast.
> > 
> > 
> > So, any idee of what I could investigate?
> 
> I presume we emulating some operation on AMD but not on Intel.
> 
> However you say xentrace shows nothing - which would imply we are not
> incurring VMEXITs to deal with this. Hmm.. Could it be what we
> expose to the guest (the CPUID flags?) Somehow we are missing one on AMD
> and it takes a slower route?

Since the same binary runs much faster in a KVM guest, I have compared
the procinfo of the guest between KVM and Xen (via /proc/cpuinfo), and
Xen have more flags:

$ dwdiff procinfo_guest_ovmf_kvm procinfo_guest_ovmf_xen
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: [-6-] {+21+}
model		: [-6-] {+1+}
model name	: [-QEMU Virtual CPU version 2.5+-] {+AMD Opteron(tm) Processor 4284+}
stepping	: [-3-] {+2+}
microcode	: [-0x1000065-] {+0x600063d+}
cpu MHz		: [-3000.034-] {+3000.112+}
cache size	: [-512-] {+2048+} KB
{+physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0+}
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu {+vme+} de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 {+ht+} syscall nx {+mmxext fxsr_opt pdpe1gb rdtscp+} lm {+rep_good+} nopl {+extd_apicid+} pni {+pclmulqdq ssse3+} cx16 {+sse4_1 sse4_2+} x2apic {+popcnt aes xsave avx+} hypervisor lahf_lm {+cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs xop lwp fma4 arat+}
bogomips	: [-6002.07-] {+6002.23+}
TLB size	: [-1024-] {+1536+} 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: [-40-] {+48+} bits physical, 48 bits virtual
power management:


-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-07-18 15:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 15:53 OVMF very slow on AMD Anthony PERARD
2016-07-15 13:48 ` Konrad Rzeszutek Wilk
2016-07-15 15:22   ` Boris Ostrovsky
2016-07-27 11:08     ` Anthony PERARD
2016-07-27 11:35       ` Anthony PERARD
2016-07-27 19:45         ` Boris Ostrovsky
2016-07-28 10:18           ` Anthony PERARD
2016-07-28 10:43             ` George Dunlap
2016-07-28 10:54               ` Andrew Cooper
2016-07-28 11:28                 ` Anthony PERARD
2016-07-28 15:17                 ` Boris Ostrovsky
2016-07-28 15:51                   ` Andrew Cooper
2016-07-28 19:25                     ` Boris Ostrovsky
2016-07-28 19:44                       ` Andrew Cooper
2016-07-28 19:54                         ` Boris Ostrovsky
2016-07-29 15:54                           ` Anthony PERARD
2016-07-18 14:10   ` Anthony PERARD
2016-07-18 15:09   ` Anthony PERARD [this message]
2016-07-22 10:40     ` Dario Faggioli

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=20160718150930.GD1835@perard.uk.xensource.com \
    --to=anthony.perard@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xen.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).