x86: optimize loading of GDT at context switch
authorJuergen Gross <jgross@suse.com>
Fri, 26 Jul 2019 08:43:42 +0000 (10:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 26 Jul 2019 08:43:42 +0000 (10:43 +0200)
commit1464c4cdd719fa5ab08b710218a866780a694dca
tree0108caeadd25c2c5061cd1336399409e81934791
parent4d6298d6829fdb621d1c722b012f18ee34b66548
x86: optimize loading of GDT at context switch

Instead of dynamically decide whether the previous vcpu was using full
or default GDT just add a percpu variable for that purpose. This at
once removes the need for testing vcpu_ids to differ twice.

This change improves performance by 0.5% - 1% on my test machine when
doing parallel compilation.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/domain.c
xen/include/asm-x86/desc.h