]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/mm: do direct hypercall in xen_set_pte() if batching is unavailable
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 1 Jun 2012 15:14:54 +0000 (16:14 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 6 Jun 2012 20:08:42 +0000 (16:08 -0400)
commitc901f72c2b0a842530bef4542bc3f0409663c750
tree4c465bf93fbc3385a22e09c8106d7acd0fa6de2c
parent5e626254206a709c6e937f3dda69bf26c7344f6f
xen/mm: do direct hypercall in xen_set_pte() if batching is unavailable

In xen_set_pte() if batching is unavailable (because the caller is in
an interrupt context such as handling a page fault) it would fall back
to using native_set_pte() and trapping and emulating the PTE write.

On 32-bit guests this requires two traps for each PTE write (one for
each dword of the PTE).  Instead, do one mmu_update hypercall
directly.

This significantly improves page fault performance in 32-bit PV
guests.

lmbench3 test  Before    After     Improvement
----------------------------------------------
lat_pagefault  3.18 us   2.32 us   27%
lat_proc fork  356 us    313.3 us  11%

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/mmu.c