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 2 of 7] linux: Remove unmap hook from vm_operations s

To: Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2 of 7] linux: Remove unmap hook from vm_operations struct
From: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Thu, 03 Jun 2010 03:12:34 -0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Delivery-date: Wed, 02 Jun 2010 20:15:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1275534752@xxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1275534752@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
linux: Remove unmap hook from vm_operations struct.

Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>

diff -r 989a51acce0a -r 68eb38b6b16b include/linux/mm.h
--- a/include/linux/mm.h        Wed Jun 02 19:45:24 2010 -0700
+++ b/include/linux/mm.h        Wed Jun 02 19:45:25 2010 -0700
@@ -206,10 +206,6 @@
         * original value of @ptep. */
        pte_t (*zap_pte)(struct vm_area_struct *vma, 
                         unsigned long addr, pte_t *ptep, int is_fullmm);
-
-       /* called before close() to indicate no more pages should be mapped */
-       void (*unmap)(struct vm_area_struct *area);
-
 #ifdef CONFIG_NUMA
        /*
         * set_policy() op must add a reference to any non-NULL @new mempolicy
diff -r 989a51acce0a -r 68eb38b6b16b mm/mmap.c
--- a/mm/mmap.c Wed Jun 02 19:45:24 2010 -0700
+++ b/mm/mmap.c Wed Jun 02 19:45:25 2010 -0700
@@ -1799,12 +1799,6 @@
        tlb_finish_mmu(tlb, start, end);
 }
 
-static inline void unmap_vma(struct vm_area_struct *vma)
-{
-       if (unlikely(vma->vm_ops && vma->vm_ops->unmap))
-               vma->vm_ops->unmap(vma);
-}
-
 /*
  * Create a list of vma's touched by the unmap, removing them from the mm's
  * vma list as we go..
@@ -1820,7 +1814,6 @@
        insertion_point = (prev ? &prev->vm_next : &mm->mmap);
        do {
                rb_erase(&vma->vm_rb, &mm->mm_rb);
-               unmap_vma(vma);
                mm->map_count--;
                tail_vma = vma;
                vma = vma->vm_next;
@@ -2103,7 +2096,7 @@
 void exit_mmap(struct mm_struct *mm)
 {
        struct mmu_gather *tlb;
-       struct vm_area_struct *vma, *vma_tmp;
+       struct vm_area_struct *vma;
        unsigned long nr_accounted = 0;
        unsigned long end;
 
@@ -2125,9 +2118,6 @@
        if (!vma)       /* Can happen if dup_mmap() received an OOM */
                return;
 
-       for (vma_tmp = mm->mmap; vma_tmp; vma_tmp = vma_tmp->vm_next)
-               unmap_vma(vma_tmp);
-
        lru_add_drain();
        flush_cache_mm(mm);
        tlb = tlb_gather_mmu(mm, 1);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel