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-changelog

[Xen-changelog] Return <4GB memory back to Xen when destroying a PAE pgd

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Return <4GB memory back to Xen when destroying a PAE pgdir.
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Feb 2006 11:32:16 +0000
Delivery-date: Fri, 24 Feb 2006 11:32:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 42fcd2e90f63d9b6f8ad70be053c70744200adb1
# Parent  2804be3661badaaab9b19a4971a1faf0fd8fad85
Return <4GB memory back to Xen when destroying a PAE pgdir.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 2804be3661ba -r 42fcd2e90f63 
linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c      Thu Feb  2 11:28:53 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c      Fri Feb 24 07:50:03 2006
@@ -718,7 +718,7 @@
 #endif
                                0,
                                pgd_ctor,
-                               PTRS_PER_PMD == 1 ? pgd_dtor : NULL);
+                               pgd_dtor);
        if (!pgd_cache)
                panic("pgtable_cache_init(): Cannot create pgd cache");
 }
diff -r 2804be3661ba -r 42fcd2e90f63 
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Thu Feb  2 11:28:53 2006
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Fri Feb 24 07:50:03 2006
@@ -298,16 +298,19 @@
        }
 }
 
-/* never called when PTRS_PER_PMD > 1 */
 void pgd_dtor(void *pgd, kmem_cache_t *cache, unsigned long unused)
 {
        unsigned long flags; /* can be called from interrupt context */
 
-       spin_lock_irqsave(&pgd_lock, flags);
-       pgd_list_del(pgd);
-       spin_unlock_irqrestore(&pgd_lock, flags);
-
-       pgd_test_and_unpin(pgd);
+       if (PTRS_PER_PMD > 1) {
+               xen_destroy_contiguous_region((unsigned long)pgd, 0);
+       } else {
+               spin_lock_irqsave(&pgd_lock, flags);
+               pgd_list_del(pgd);
+               spin_unlock_irqrestore(&pgd_lock, flags);
+
+               pgd_test_and_unpin(pgd);
+       }
 }
 
 pgd_t *pgd_alloc(struct mm_struct *mm)

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

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