ia64/xen-unstable

changeset 9080:333db05b8bbb

[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@intel.com>
author awilliam@xenbuild.aw
date Fri Mar 03 10:11:33 2006 -0700 (2006-03-03)
parents b4f1084177cc
children 983311b895be
files xen/arch/ia64/xen/xensetup.c xen/include/asm-ia64/config.h
line diff
     1.1 --- a/xen/arch/ia64/xen/xensetup.c	Wed Mar 01 15:06:24 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/xensetup.c	Fri Mar 03 10:11:33 2006 -0700
     1.3 @@ -155,24 +155,6 @@ struct ns16550_defaults ns16550_com2 = {
     1.4      .parity    = 'n',
     1.5      .stop_bits = 1
     1.6  };
     1.7 -/*  This is a wrapper function of init_domheap_pages,
     1.8 - *  memory exceeds (max_page<<PAGE_SHIFT) will not be reclaimed.
     1.9 - *  This function will go away when the virtual memmap/discontig
    1.10 - *  memory issues are solved
    1.11 - */
    1.12 -void init_domheap_pages_wrapper(unsigned long ps, unsigned long pe)
    1.13 -{
    1.14 -    unsigned long s_nrm, e_nrm, max_mem;
    1.15 -    max_mem = (max_page+1)<<PAGE_SHIFT;
    1.16 -    s_nrm = (ps+PAGE_SIZE-1)&PAGE_MASK;
    1.17 -    e_nrm = pe&PAGE_MASK;
    1.18 -    s_nrm = min(s_nrm, max_mem);
    1.19 -    e_nrm = min(e_nrm, max_mem);
    1.20 -    if(s_nrm < e_nrm)
    1.21 -         init_domheap_pages(s_nrm, e_nrm);
    1.22 -}
    1.23 -
    1.24 -
    1.25  
    1.26  void start_kernel(void)
    1.27  {
    1.28 @@ -393,17 +375,6 @@ printk("About to call domain_create()\n"
    1.29      /* PIN domain0 on CPU 0.  */
    1.30      dom0->vcpu[0]->cpu_affinity = cpumask_of_cpu(0);
    1.31  
    1.32 -    /* The stash space for the initial kernel image can now be freed up. */
    1.33 -    /* init_domheap_pages_wrapper is temporary solution, please refer to the
    1.34 -     * descriptor of this function */
    1.35 -    init_domheap_pages_wrapper(ia64_boot_param->domain_start,
    1.36 -           ia64_boot_param->domain_start+ia64_boot_param->domain_size);
    1.37 -    /* throw away initrd area passed from elilo */
    1.38 -    if (ia64_boot_param->initrd_size) {
    1.39 -        init_domheap_pages_wrapper(ia64_boot_param->initrd_start,
    1.40 -           ia64_boot_param->initrd_start+ia64_boot_param->initrd_size);
    1.41 -    }
    1.42 -
    1.43      if (!running_on_sim)  // slow on ski and pages are pre-initialized to zero
    1.44  	scrub_heap_pages();
    1.45  
     2.1 --- a/xen/include/asm-ia64/config.h	Wed Mar 01 15:06:24 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/config.h	Fri Mar 03 10:11:33 2006 -0700
     2.3 @@ -249,7 +249,7 @@ extern unsigned long loops_per_jiffy;
     2.4  extern char saved_command_line[];
     2.5  struct screen_info { };
     2.6  #define seq_printf(a,b...) printf(b)
     2.7 -#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
     2.8 +//#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
     2.9  
    2.10  void dummy_called(char *function);
    2.11  #define dummy()	dummy_called((char *) __FUNCTION__)