summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-01-30 12:33:40 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-01-30 12:33:40 (GMT)
commit8fe3deef013bebdbed1f75ae59ef9707fb6e5cc7 (patch)
treec743ab7d0cf74c46f57b36571691d69c1ca4389b /include
parent1c70e9bd832642b712181e32d1bbf2436058a3df (diff)
downloadlinux-fsl-qoriq-8fe3deef013bebdbed1f75ae59ef9707fb6e5cc7.tar.xz
x86: preallocate pmds at pgd creation time
In PAE mode, an update to the pgd requires a cr3 reload to make sure the processor notices the changes. Since this also has the side-effect of flushing the tlb, its an expensive operation which we want to avoid where possible. This patch mitigates the cost of installing the initial set of pmds on process creation by preallocating them when the pgd is allocated. This avoids up to three tlb flushes during exec, as it creates the new process address space while the pagetable is in active use. The pmds will be freed as part of the normal pagetable teardown in free_pgtables, which is called in munmap and process exit. However, free_pgtables will only free parts of the pagetable which actually contain mappings, so stray pmds may still be attached to the pgd at pgd_free time. We must mop them up to prevent a memory leak. Signed-off-by: Jeremy 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: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions