[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Return <4GB memory back to Xen when destroying a PAE pgdir.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |