diff options
author | Zachary Amsden <zach@vmware.com> | 2006-10-01 02:29:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:33 -0400 |
commit | 9888a1cae3f859db38b9604e3df1c02177161bb0 (patch) | |
tree | 5954dc5e1a2dc1251a57a41aa15b7776a530f230 /mm | |
parent | 3dc907951446b9317b1887223caa4e083390de9f (diff) |
[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: Zachary Amsden <zach@vmware.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/fremap.c | 2 | ||||
-rw-r--r-- | mm/memory.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mm/fremap.c b/mm/fremap.c index aa30618ec6b2..7a9d0f5d246d 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -39,7 +39,7 @@ static int zap_pte(struct mm_struct *mm, struct vm_area_struct *vma, | |||
39 | } else { | 39 | } else { |
40 | if (!pte_file(pte)) | 40 | if (!pte_file(pte)) |
41 | free_swap_and_cache(pte_to_swp_entry(pte)); | 41 | free_swap_and_cache(pte_to_swp_entry(pte)); |
42 | pte_clear(mm, addr, ptep); | 42 | pte_clear_not_present_full(mm, addr, ptep, 0); |
43 | } | 43 | } |
44 | return !!page; | 44 | return !!page; |
45 | } | 45 | } |
diff --git a/mm/memory.c b/mm/memory.c index 7707187484cc..2e754621d333 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -690,7 +690,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, | |||
690 | continue; | 690 | continue; |
691 | if (!pte_file(ptent)) | 691 | if (!pte_file(ptent)) |
692 | free_swap_and_cache(pte_to_swp_entry(ptent)); | 692 | free_swap_and_cache(pte_to_swp_entry(ptent)); |
693 | pte_clear_full(mm, addr, pte, tlb->fullmm); | 693 | pte_clear_not_present_full(mm, addr, pte, tlb->fullmm); |
694 | } while (pte++, addr += PAGE_SIZE, (addr != end && *zap_work > 0)); | 694 | } while (pte++, addr += PAGE_SIZE, (addr != end && *zap_work > 0)); |
695 | 695 | ||
696 | add_mm_rss(mm, file_rss, anon_rss); | 696 | add_mm_rss(mm, file_rss, anon_rss); |