Commit 9888a1ca authored by Zachary Amsden's avatar Zachary Amsden Committed by Linus Torvalds
Browse files

[PATCH] paravirt: pte clear not present

Change pte_clear_full to a more appropriately named pte_clear_not_present,
allowing optimizations when not-present mapping changes need not be reflected
in the hardware TLB for protected page table modes.  There is also another
case that can use it in the fremap code.
Signed-off-by: default avatarZachary Amsden <>
Signed-off-by: default avatarJeremy Fitzhardinge <>
Cc: Rusty Russell <>
Cc: Andi Kleen <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 3dc90795
......@@ -112,8 +112,13 @@ do { \
#define pte_clear_full(__mm, __address, __ptep, __full) \
* Some architectures may be able to avoid expensive synchronization
* primitives when modifications are made to PTE's which are already
* not present, or in the process of an address space destruction.
#define pte_clear_not_present_full(__mm, __address, __ptep, __full) \
do { \
pte_clear((__mm), (__address), (__ptep)); \
} while (0)
......@@ -39,7 +39,7 @@ static int zap_pte(struct mm_struct *mm, struct vm_area_struct *vma,
} else {
if (!pte_file(pte))
pte_clear(mm, addr, ptep);
pte_clear_not_present_full(mm, addr, ptep, 0);
return !!page;
......@@ -690,7 +690,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
if (!pte_file(ptent))
pte_clear_full(mm, addr, pte, tlb->fullmm);
pte_clear_not_present_full(mm, addr, pte, tlb->fullmm);
} while (pte++, addr += PAGE_SIZE, (addr != end && *zap_work > 0));
add_mm_rss(mm, file_rss, anon_rss);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment