]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/xen: avoid updating TLS descriptors if they haven't changed
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 9 Jul 2012 10:39:08 +0000 (11:39 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 19 Jul 2012 23:06:11 +0000 (19:06 -0400)
commitb41281b150b5eede87a3194e28c55fa7a6fb2104
tree61bb4f64a4a422735f3b94899cf94cc979500faf
parent66c47725676bb419d7141e60b294faad485fd107
x86/xen: avoid updating TLS descriptors if they haven't changed

When switching tasks in a Xen PV guest, avoid updating the TLS
descriptors if they haven't changed.  This improves the speed of
context switches by almost 10% as much of the time the descriptors are
the same or only one is different.

The descriptors written into the GDT by Xen are modified from the
values passed in the update_descriptor hypercall so we keep shadow
copies of the three TLS descriptors to compare against.

lmbench3 test     Before  After  Improvement
--------------------------------------------
lat_ctx -s 32 24   7.19    6.52  9%
lat_pipe          12.56   11.66  7%

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