x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Sat, 23 Mar 2013 13:36:36 +0000 (09:36 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 25 Apr 2013 19:25:37 +0000 (20:25 +0100)
commit04de139ab01f8a7e1e2d28f27cb28054d64985f5
tree7800d058d6671792e647ade79689a0a867ee21e6
parent5bb757c000c7801614470079687473c39e666c87
x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

commit 511ba86e1d386f671084b5d0e6f110bb30b8eeb2 upstream.

Invoking arch_flush_lazy_mmu_mode() results in calls to
preempt_enable()/disable() which may have performance impact.

Since lazy MMU is not used on bare metal we can patch away
arch_flush_lazy_mmu_mode() so that it is never called in such
environment.

[ hpa: the previous patch "Fix vmalloc_fault oops during lazy MMU
  updates" may cause a minor performance regression on
  bare metal.  This patch resolves that performance regression.  It is
  somewhat unclear to me if this is a good -stable candidate. ]

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1364045796-10720-2-git-send-email-konrad.wilk@oracle.com
Tested-by: Josh Boyer <jwboyer@redhat.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/kernel/paravirt.c
arch/x86/lguest/boot.c
arch/x86/xen/mmu.c