diff options
author | Zachary Amsden <zach@vmware.com> | 2006-01-06 03:11:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:33 -0500 |
commit | 7c4cb60e5b97677424e95baee9c29df54b26e6ba (patch) | |
tree | a2ad6e6104e153d15bc4bfbb67f74b0e05fea03c /arch/i386/kernel/smpboot.c | |
parent | 599a6e8ca4ff7f453f847217ecc2718d68e3b0f6 (diff) |
[PATCH] x86: GDT alignment fix
Make GDT page aligned and page padded to support running inside of a
hypervisor. This prevents false sharing of the GDT page with other hot
data, which is not allowed in Xen, and causes performance problems in
VMware.
Rather than go back to the old method of statically allocating the GDT
(which wastes unneded space for non-present CPUs), the GDT for APs is
allocated dynamically.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 9ed449af8e9f..b3c2e2c26743 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -903,6 +903,12 @@ static int __devinit do_boot_cpu(int apicid, int cpu) | |||
903 | unsigned long start_eip; | 903 | unsigned long start_eip; |
904 | unsigned short nmi_high = 0, nmi_low = 0; | 904 | unsigned short nmi_high = 0, nmi_low = 0; |
905 | 905 | ||
906 | if (!cpu_gdt_descr[cpu].address && | ||
907 | !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) { | ||
908 | printk("Failed to allocate GDT for CPU %d\n", cpu); | ||
909 | return 1; | ||
910 | } | ||
911 | |||
906 | ++cpucount; | 912 | ++cpucount; |
907 | 913 | ||
908 | /* | 914 | /* |