xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Peter Maloney <peter.maloney@brockmann-consult.de>
Cc: Andres Lagar-Cavilla <andres@lagarcavilla.org>, xen-devel@lists.xen.org
Subject: Re: xen-unstable, winxp32 very poor performance on AMD FX-8150, I bisected and changeset is 24770:7f79475d3de7
Date: Thu, 1 Nov 2012 17:00:16 +0000	[thread overview]
Message-ID: <20121101170016.GD61948@ocelot.phlegethon.org> (raw)
In-Reply-To: <20121022135920.GE12577@ocelot.phlegethon.org>

Hi,

At 14:59 +0100 on 22 Oct (1350917960), Tim Deegan wrote:
> At 19:21 +0200 on 20 Oct (1350760876), Peter Maloney wrote:
> > The change was 8 months ago
> > 
> > changeset:   24770:7f79475d3de7
> > user:        Andres Lagar-Cavilla <andres@lagarcavilla.org>
> > date:        Fri Feb 10 16:07:07 2012 +0000
> > summary:     x86/mm: Make p2m lookups fully synchronized wrt modifications
> 
> This change was bad for performnace across the board and most of it has
> since been either reverted or amended, but clearly we missed something
> here. 
> 
> It's interesting that Win8 isn't slowed down.  I wonder whether that's to
> do with the way it drives the VGA card -- IIRC it uses a generic VESA
> driver rather than a Cirrus one. 

In fact this is to do with the APIC.  On my test system, a busy 2-vcpu
VM is making about 300k/s accesses to the APIC TPR.  These accesses are
all trapped and emulated by Xen, and that emulation has got more
expensive as part of this change.

Later Windows OSes have a feature called 'lazy IRQL' which makes those
accesses go away, but sadly that's not been done for WinXP.  On modern
Intel CPUs, the hardware acceleration for TPR accesses works for XP; on
AMD it requires the OS to use 'MOV reg32, CR8' to access the TPR instead
of MMIO, which XP is clearly not doing. :(

Peter: if you have the option, you might find that installing the PV
drivers that ship with Citrix XenServer 6.0 makes things work better.

Andres: even though this load of APIC emulations is pretty extreme, it's
surprising that the VM runs faster on shadow pagetables!  Any ideas for
where this slowdown is coming from?

Cheers,

Tim.

  parent reply	other threads:[~2012-11-01 17:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 17:21 xen-unstable, winxp32 very poor performance on AMD FX-8150, I bisected and changeset is 24770:7f79475d3de7 Peter Maloney
2012-10-20 18:40 ` Peter Maloney
2012-10-22 13:56 ` Andres Lagar-Cavilla
2012-10-22 13:59 ` Tim Deegan
2012-10-23 22:17   ` Peter Maloney
2012-11-01 17:00   ` Tim Deegan [this message]
2012-11-01 17:28     ` Andres Lagar-Cavilla
2012-11-13 13:17       ` Peter Maloney
2012-11-22 18:54         ` Peter Maloney
2013-01-12 15:25           ` Peter Maloney
2013-01-17 20:57             ` Pasi Kärkkäinen
2013-01-18 14:22               ` George Dunlap
2013-01-18 14:40                 ` Andres Lagar-Cavilla
2013-01-21 12:07                   ` George Dunlap
2013-01-18 14:30             ` George Dunlap
2013-01-26 12:30               ` Peter Maloney

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=20121101170016.GD61948@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=andres@lagarcavilla.org \
    --cc=peter.maloney@brockmann-consult.de \
    --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).