xen/mmu: Use Xen specific TLB flush instead of the generic one.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 31 Oct 2012 16:38:31 +0000 (12:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 21:15:54 +0000 (13:15 -0800)
commitda205c80275a7f7a90c2baab423783c55c406878
treeca82d03015baada1f76432e5fc4f4a0777ec00e4
parentccd37ab3230af7b32db1a139d9fe95918813bc23
xen/mmu: Use Xen specific TLB flush instead of the generic one.

commit 95a7d76897c1e7243d4137037c66d15cbf2cce76 upstream.

As Mukesh explained it, the MMUEXT_TLB_FLUSH_ALL allows the
hypervisor to do a TLB flush on all active vCPUs. If instead
we were using the generic one (which ends up being xen_flush_tlb)
we end up making the MMUEXT_TLB_FLUSH_LOCAL hypercall. But
before we make that hypercall the kernel will IPI all of the
vCPUs (even those that were asleep from the hypervisor
perspective). The end result is that we needlessly wake them
up and do a TLB flush when we can just let the hypervisor
do it correctly.

This patch gives around 50% speed improvement when migrating
idle guest's from one host to another.

Oracle-bug: 14630170

Tested-by: Jingjie Jiang <jingjie.jiang@oracle.com>
Suggested-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/mmu.c
include/trace/events/xen.h