ia64/xen-unstable

changeset 14365:c0cdb349a11a

[IA64] Use domheap instead of xenheap for P2M table

This allows larger memory configurations without exhausting xenheap.
New boot option 'p2m_xenheap' reverts to previous behavior.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Wed Mar 14 09:33:40 2007 -0600 (2007-03-14)
parents cb2575cec95c
children a862200c572a
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Mon Mar 12 10:07:08 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Wed Mar 14 09:33:40 2007 -0600
     1.3 @@ -1903,9 +1903,20 @@ void __free_pages(struct page_info *page
     1.4  	free_xenheap_page(page);
     1.5  }
     1.6  
     1.7 +static int opt_p2m_xenheap;
     1.8 +boolean_param("p2m_xenheap", opt_p2m_xenheap);
     1.9 +
    1.10  void *pgtable_quicklist_alloc(void)
    1.11  {
    1.12      void *p;
    1.13 +    if (!opt_p2m_xenheap) {
    1.14 +        struct page_info *page = alloc_domheap_page(NULL);
    1.15 +        if (page == NULL)
    1.16 +            return NULL;
    1.17 +        p = page_to_virt(page);
    1.18 +        clear_page(p);
    1.19 +        return p;
    1.20 +    }
    1.21      p = alloc_xenheap_pages(0);
    1.22      if (p)
    1.23          clear_page(p);
    1.24 @@ -1914,7 +1925,10 @@ void *pgtable_quicklist_alloc(void)
    1.25  
    1.26  void pgtable_quicklist_free(void *pgtable_entry)
    1.27  {
    1.28 -	free_xenheap_page(pgtable_entry);
    1.29 +    if (!opt_p2m_xenheap)
    1.30 +        free_domheap_page(virt_to_page(pgtable_entry));
    1.31 +    else
    1.32 +        free_xenheap_page(pgtable_entry);
    1.33  }
    1.34  
    1.35  void put_page_type(struct page_info *page)