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-ia64-devel

[Xen-ia64-devel] [PATCH] change layout of p2m table from xenheap to domh

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] change layout of p2m table from xenheap to domheap
From: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Date: Mon, 12 Mar 2007 18:28:04 +0900
Delivery-date: Mon, 12 Mar 2007 02:27:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Current xen can not fully utilize 64GB memory since xenheap is
exhausted by p2m tables.

This patch changes the layout of p2m table from xenheap to domheap. 
The side effect is subtle performance down due to TLB miss.

A new boot option 'p2m_xenheap' enables the previous setting that p2m
table is allocated in xenheap. 
I dare to change the default for the future.

If there are no objections, please apply.

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 9fbaf07d3f67 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Thu Mar 08 09:50:25 2007 -0700
+++ b/xen/arch/ia64/xen/mm.c    Mon Mar 12 17:45:56 2007 +0900
@@ -1903,9 +1903,20 @@ void __free_pages(struct page_info *page
        free_xenheap_page(page);
 }
 
+static int opt_p2m_xenheap;
+boolean_param("p2m_xenheap", opt_p2m_xenheap);
+
 void *pgtable_quicklist_alloc(void)
 {
     void *p;
+    if (!opt_p2m_xenheap) {
+        struct page_info *page = alloc_domheap_page(NULL);
+        if (page == NULL)
+            return NULL;
+        p = page_to_virt(page);
+        clear_page(p);
+        return p;
+    }
     p = alloc_xenheap_pages(0);
     if (p)
         clear_page(p);
@@ -1914,7 +1925,10 @@ void *pgtable_quicklist_alloc(void)
 
 void pgtable_quicklist_free(void *pgtable_entry)
 {
-       free_xenheap_page(pgtable_entry);
+    if (!opt_p2m_xenheap)
+        free_domheap_page(virt_to_page(pgtable_entry));
+    else
+        free_xenheap_page(pgtable_entry);
 }
 
 void put_page_type(struct page_info *page)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>