• Andi Kleen's avatar
    [PATCH] Optimize PDA accesses slightly · 53ee11ae
    Andi Kleen authored
    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: default avatarAndi Kleen <ak@suse.de>
    53ee11ae
setup64.c 7.23 KB