Three patches to clean up GDT access in Linux to make it friendly to virtualization environments. The basic problem is that the GDT must be write protected, which causes spurious overhead when the GDT lies on the same page as other data. This problem exists both for VMware and Xen; Xen actually requires page isolation, so we have implemented the most general and compatible solution. Patch 1 deprecates a broken GDT reference; Patch 2 adds a per-cpu GDT accessor; Patch 3 moves the GDT out of the per-cpu area and makes it page padded and page aligned. The GDTs for secondary processors are allocated dynamically to avoid bloating kernel static data with GDTs for not-present processors. This could be adapted to drop and reallocate GDTs for CPU hotplug if desired, although the space savings (1 page) are dubious, so I have not implemented that at this time. Testing: 4 way SMP boot-halts, kernel compiles, stress. Zachary Amsden <zach@vmware.com>
Magenheimer, Dan (HP Labs Fort Collins)
2007-Apr-18 17:49 UTC
[PATCH 0/3] GDT virtualization performance
(Note... reply list substantially reduced) What is the status for getting virtualization preparatory changes into the kernel? Approx. how many have/are going into which releases? At what release is it expected that Linux for Xen (or the Vmware PVI) will be buildable in a released kernel? I have a virtualization prep patch for Linux/ia64 (entirely contained in archdep for ia64) and have been getting push-back from Tony (the Linux/ia64 maintainer) that he isn't in any hurry to apply it in part because the x86 stuff isn't going in yet. So I'd appreciate any info. Thanks, Dan> -----Original Message----- > From: virtualization-bounces@lists.osdl.org > [mailto:virtualization-bounces@lists.osdl.org] On Behalf Of > Zachary Amsden > Sent: Thursday, September 22, 2005 1:35 AM > To: Linus Torvalds; Jeffrey Sheldon; Ole Agesen; Shai > Fultheim; Andrew Morton; Jack Lo; Ingo Molnar; Linux Kernel > Mailing List; Virtualization Mailing List; Chris Wright; > Martin Bligh; Pratap Subrahmanyam; Christopher Li; H. Peter > Anvin; Zwane Mwaikambo; Andi Kleen; Zachary Amsden > Subject: [PATCH 0/3] GDT virtualization performance > > Three patches to clean up GDT access in Linux to make it friendly to > virtualization environments. The basic problem is that the GDT must > be write protected, which causes spurious overhead when the GDT lies > on the same page as other data. This problem exists both for VMware > and Xen; Xen actually requires page isolation, so we have implemented > the most general and compatible solution. > > Patch 1 deprecates a broken GDT reference; > Patch 2 adds a per-cpu GDT accessor; > Patch 3 moves the GDT out of the per-cpu area and makes it page > padded and page aligned. > > The GDTs for secondary processors are allocated dynamically to avoid > bloating kernel static data with GDTs for not-present processors. > > This could be adapted to drop and reallocate GDTs for CPU hotplug > if desired, although the space savings (1 page) are dubious, so > I have not implemented that at this time. > > Testing: 4 way SMP boot-halts, kernel compiles, stress. > > Zachary Amsden <zach@vmware.com> >