[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Xen 4.3 development update



On 02/05/13 16:48, Tim Deegan wrote:
At 15:21 +0200 on 29 Apr (1367248894), Peter Maloney wrote:
On 04/04/2013 07:05 PM, Tim Deegan wrote:
Also, if there is still a bad slowdown, caused by the p2m lookups, this
might help a little bit:

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 38e87ce..7bd8646 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1361,6 +1361,18 @@ int hvm_hap_nested_page_fault(paddr_t gpa,
          }
      }
+
+    /* For the benefit of 32-bit WinXP (& older Windows) on AMD CPUs,
+     * a fast path for LAPIC accesses, skipping the p2m lookup. */
+    if ( !nestedhvm_vcpu_in_guestmode(v)
+         && gfn == vlapic_base_address(vcpu_vlapic(current)) >> PAGE_SHIFT )
+    {
+        if ( !handle_mmio() )
+            hvm_inject_hw_exception(TRAP_gp_fault, 0);
+        rc = 1;
+        goto out;
+    }
+
      p2m = p2m_get_hostp2m(v->domain);
      mfn = get_gfn_type_access(p2m, gfn, &p2mt, &p2ma,
                                P2M_ALLOC | (access_w ? P2M_UNSHARE : 0), NULL);
This patch (applied to 4.2.2) has a very large improvement on my box
(AMD FX-8150) and WinXP 32 bit.
Hmm - I expected it to be only a mild improvement.  How about this one,
which puts in the same shortcut in another place as well?  I don't think
it will be much better than the last one, but it's worth a try.

So I dusted off my old perf testing scripts and added in one to measure boot performance.

Below are boot times, from after "xl create" returns, until a specific python daemon running in the VM starts responding to requests. So lower is better.

There are a number of places where there can be a few seconds of noise either way, but on the whole the tests seem fairly repeatable.

I ran this with w2k3eesp2 and with winxpsp3, using some of the auto-install test images made for the XenServer regression testing. All of them are using a flat file disk backend with qemu-traditional.

Results are in order of commits:

Xen 4.1:

w2k3: 43 34 34 33 34
winxp: 110 111 111 110 112

Xen 4.2:

w2k3: 34 44 45 45 45
winxp: 203 221 210 211 200

Xen-unstable w/ RTC fix:

w2k3: 43 44 44 45 44
winxp: 268 275 265 276 265

Xen-unstable with rtc fix + this "fast lapic" patch:

w2k3: 43 45 44 45 45
winxp: 224 232 232 232 232


So w2k3 boots fairly quickly anyway; has a 50% slow-down when moving from 4.1 to 4.2, and no discernible change after that.

winxp boots fairly slowly; nearly doubles in speed for 4.2, and gets even worse for xen-unstable. The patch is a measurable improvement, but still nowhere near 4.1, or even 4.2.

On the whole however -- I'm not sure that boot time by itself is a blocker. If the problem really is primarily the "eager TPR" issue for Windows XP, then I'm not terribly motivated either: the Citrix PV drivers patch Windows XP to modify the routine to be lazy (like w2k3); there is hardware available which allows the TPR to be virtualized; and there are plenty of Windows-based OSes available which do not have this problem.

I'll be doing some more workload-based benchmarks (probably starting with the Windows ddk example build) to see if there are other issues I turn up.

 -George

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.