• Jeremy Fitzhardinge's avatar
    x86: don't special-case pmd allocations as much · 6194ba6f
    Jeremy Fitzhardinge authored
    In x86 PAE mode, stop treating pmds as a special case.  Previously
    they were always allocated and freed with the pgd.  The modifies the
    code to be the same as 64-bit mode, where they are allocated on
    demand.
    
    This is a step on the way to unifying 32/64-bit pagetable allocation
    as much as possible.
    
    There is a complicating wart, however.  When you install a new
    reference to a pmd in the pgd, the processor isn't guaranteed to see
    it unless you reload cr3.  Since reloading cr3 also has the
    side-effect of flushing the tlb, this is an expense that we want to
    avoid whereever possible.
    
    This patch simply avoids reloading cr3 unless the update is to the
    current pagetable.  Later patches will optimise this further.
    Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: William Irwin <wli@holomorphy.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    6194ba6f
pgtable_32.h 6.95 KB