Skip to content

GDT virtualization performance

Zachary Amsden lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Bogus tls from gdtarch/i386/kernel/cpu/common.c+0 -61 reply
2/3Gdt_accessorarch/i386/kernel/apm.c arch/i386/kernel/cpu/common.c arch/i386/mm/fault.c +1 more+32 -271 reply
3/3Gdt page isolationarch/i386/kernel/cpu/common.c arch/i386/kernel/head.S arch/i386/kernel/i386_ksyms.c +2 more+6 -85 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchIngo Molnar
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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 <[email protected]>