[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 70575c8cab99332d3836be101e6f3b6cf7228715 # Parent 5e73c92e5f1fcaae0de27dda229355a7ac848306 Return <4GB memory back to Xen when destroying a PAE pgdir. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 5e73c92e5f1f -r 70575c8cab99 linux-2.6-xen-sparse/arch/i386/mm/init-xen.c --- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Fri Feb 24 07:28:04 2006 +++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Fri Feb 24 07:49:32 2006 @@ -759,7 +759,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 5e73c92e5f1f -r 70575c8cab99 linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c --- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Fri Feb 24 07:28:04 2006 +++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Fri Feb 24 07:49:32 2006 @@ -320,16 +320,20 @@ } } -/* 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) { + if (!xen_feature(XENFEAT_pae_pgdir_above_4gb)) + 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 |