WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 10 of 13] Change pte_clear_full to a more appropriate

To: Andrew Morton <akpm@xxxxxxxx>
Subject: [Xen-devel] [PATCH 10 of 13] Change pte_clear_full to a more appropriately named pte_clear_not_present,
From: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Date: Tue, 01 Aug 2006 13:00:48 -0700
Cc: Virtualization <virtualization@xxxxxxxx>, Zachary Amsden <zach@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>, Hollis Blanchard <hollisb@xxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Linux Kernel <linux-kernel@xxxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, Christoph Lameter <clameter@xxxxxxx>
Delivery-date: Tue, 01 Aug 2006 13:18:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1154462438@ezr>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
3 files changed, 4 insertions(+), 4 deletions(-)
include/asm-generic/pgtable.h |    4 ++--
mm/fremap.c                   |    2 +-
mm/memory.c                   |    2 +-


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@xxxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>



===================================================================

diff -r 20f9c0c451af -r 553154516a1b include/asm-generic/pgtable.h
--- a/include/asm-generic/pgtable.h     Tue Aug 01 01:32:00 2006 -0700
+++ b/include/asm-generic/pgtable.h     Tue Aug 01 01:32:00 2006 -0700
@@ -110,8 +110,8 @@ do {                                                        
                  \
 })
 #endif
 
-#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
-#define pte_clear_full(__mm, __address, __ptep, __full)                        
\
+#ifndef __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL
+#define pte_clear_not_present_full(__mm, __address, __ptep, __full)    \
 do {                                                                   \
        pte_clear((__mm), (__address), (__ptep));                       \
 } while (0)
diff -r 20f9c0c451af -r 553154516a1b mm/fremap.c
--- a/mm/fremap.c       Tue Aug 01 01:32:00 2006 -0700
+++ b/mm/fremap.c       Tue Aug 01 01:32:00 2006 -0700
@@ -39,7 +39,7 @@ static int zap_pte(struct mm_struct *mm,
        } else {
                if (!pte_file(pte))
                        free_swap_and_cache(pte_to_swp_entry(pte));
-               pte_clear(mm, addr, ptep);
+               pte_clear_not_present_full(mm, addr, ptep, 0);
        }
        return !!page;
 }
diff -r 20f9c0c451af -r 553154516a1b mm/memory.c
--- a/mm/memory.c       Tue Aug 01 01:32:00 2006 -0700
+++ b/mm/memory.c       Tue Aug 01 01:32:00 2006 -0700
@@ -689,7 +689,7 @@ static unsigned long zap_pte_range(struc
                        continue;
                if (!pte_file(ptent))
                        free_swap_and_cache(pte_to_swp_entry(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);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>