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] [IA64] Avoid double reclaim dom0 image and dom0 initrd

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [IA64] Avoid double reclaim dom0 image and dom0 initrd
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Mar 2006 11:18:07 +0000
Delivery-date: Sat, 18 Mar 2006 11:19:23 +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 awilliam@xxxxxxxxxxx
# Node ID 333db05b8bbb1e07583608c8efe4fa97a6b64cc4
# Parent  b4f1084177cc50863e501dfe5dd94f376b6625b0
[IA64] Avoid double reclaim dom0 image and dom0 initrd

VMM doesn't need to reclaim dom0 image and dom0 initrd by using 
init_domheap_pages, because they have been reclaimed by below code:
in function start_kernel of xensetup.c
    efi_memmap_walk(filter_rsvd_memory, init_boot_pages);
Reclaiming again may cause xen hang at very beginning.
 
BTW, dom0 initrd is for dom0 not for xen, it will be copied into dom0 
memory space, so VMM doesn't need to reserve memory for dom0 initrd.
Commenting below definition makes dom0 initrd reclaimable.
-#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
+//#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>

diff -r b4f1084177cc -r 333db05b8bbb xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Wed Mar  1 22:06:24 2006
+++ b/xen/arch/ia64/xen/xensetup.c      Fri Mar  3 17:11:33 2006
@@ -155,24 +155,6 @@
     .parity    = 'n',
     .stop_bits = 1
 };
-/*  This is a wrapper function of init_domheap_pages,
- *  memory exceeds (max_page<<PAGE_SHIFT) will not be reclaimed.
- *  This function will go away when the virtual memmap/discontig
- *  memory issues are solved
- */
-void init_domheap_pages_wrapper(unsigned long ps, unsigned long pe)
-{
-    unsigned long s_nrm, e_nrm, max_mem;
-    max_mem = (max_page+1)<<PAGE_SHIFT;
-    s_nrm = (ps+PAGE_SIZE-1)&PAGE_MASK;
-    e_nrm = pe&PAGE_MASK;
-    s_nrm = min(s_nrm, max_mem);
-    e_nrm = min(e_nrm, max_mem);
-    if(s_nrm < e_nrm)
-         init_domheap_pages(s_nrm, e_nrm);
-}
-
-
 
 void start_kernel(void)
 {
@@ -393,17 +375,6 @@
     /* PIN domain0 on CPU 0.  */
     dom0->vcpu[0]->cpu_affinity = cpumask_of_cpu(0);
 
-    /* The stash space for the initial kernel image can now be freed up. */
-    /* init_domheap_pages_wrapper is temporary solution, please refer to the
-     * descriptor of this function */
-    init_domheap_pages_wrapper(ia64_boot_param->domain_start,
-           ia64_boot_param->domain_start+ia64_boot_param->domain_size);
-    /* throw away initrd area passed from elilo */
-    if (ia64_boot_param->initrd_size) {
-        init_domheap_pages_wrapper(ia64_boot_param->initrd_start,
-           ia64_boot_param->initrd_start+ia64_boot_param->initrd_size);
-    }
-
     if (!running_on_sim)  // slow on ski and pages are pre-initialized to zero
        scrub_heap_pages();
 
diff -r b4f1084177cc -r 333db05b8bbb xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Wed Mar  1 22:06:24 2006
+++ b/xen/include/asm-ia64/config.h     Fri Mar  3 17:11:33 2006
@@ -249,7 +249,7 @@
 extern char saved_command_line[];
 struct screen_info { };
 #define seq_printf(a,b...) printf(b)
-#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
+//#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
 void dummy_called(char *function);
 #define dummy()        dummy_called((char *) __FUNCTION__)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [IA64] Avoid double reclaim dom0 image and dom0 initrd, Xen patchbot -unstable <=