[PATCH] Optimize PDA accesses slightly
authorAndi Kleen <ak@suse.de>
Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Tue, 26 Sep 2006 08:52:38 +0000 (10:52 +0200)
commit53ee11ae0d73f28029a5f0d991bc4dcd7c817e7a
treec0a025cc592d516674bb1d8a0046bf281b6d1724
parent80d2679cbc8e170011c9649fb8fb684ffd7e5c8f
[PATCH] Optimize PDA accesses slightly

Based on a idea by Jeremy Fitzhardinge:

Replace the volatiles and memory clobbers in the PDA access with
telling gcc about access to a proxy PDA structure that doesn't
actually exist. But the dummy accesses give a defined ordering for
read/write accesses.

Also add some memory barriers to the early GS initialization to
make sure no PDA access is moved before it.

Advantage is some .text savings (probably most from better
code for accessing "current"):

   text    data     bss     dec     hex filename
4845647 1223688  615864 6685199  66020f vmlinux
4837780 1223688  615864 6677332  65e354 vmlinux-pda

1.2% smaller code

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/x86_64/kernel/setup64.c
include/asm-x86_64/pda.h