]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 7 Nov 2012 13:53:25 +0000 (05:53 -0800)
commite5fa8f37bc0b06dd8c20300d78d9db1364f1cb67
tree009399a5f098128fbc2e3a59e2d0c8320483263c
parent0aed4cd98188e63382a8b230fc0d2fcb91da442d
xen/mmu: Use Xen specific TLB flush instead of the generic one.

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

CC: stable@vger.kernel.org
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>
(cherry picked from commit 95a7d76897c1e7243d4137037c66d15cbf2cce76)
arch/x86/xen/mmu.c
include/trace/events/xen.h