direct-io.hg

changeset 10310:4df81d20a9a1

[LINUX][X86/64] Initialise pages outside initial allocation so that
they are picked up by the balloon driver.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 09 16:18:40 2006 +0100 (2006-06-09)
parents 5a0ed6c47673
children 43f1d77bc7ad
files linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Fri Jun 09 14:29:00 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c	Fri Jun 09 16:18:40 2006 +0100
     1.3 @@ -882,6 +882,7 @@ static struct kcore_list kcore_mem, kcor
     1.4  void __init mem_init(void)
     1.5  {
     1.6  	long codesize, reservedpages, datasize, initsize;
     1.7 +	unsigned long pfn;
     1.8  
     1.9  	contiguous_bitmap = alloc_bootmem_low_pages(
    1.10  		(end_pfn + 2*BITS_PER_LONG) >> 3);
    1.11 @@ -910,6 +911,12 @@ void __init mem_init(void)
    1.12  #else
    1.13  	totalram_pages = free_all_bootmem();
    1.14  #endif
    1.15 +	/* XEN: init and count pages outside initial allocation. */
    1.16 +	for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
    1.17 +		ClearPageReserved(&mem_map[pfn]);
    1.18 +		set_page_count(&mem_map[pfn], 1);
    1.19 +		totalram_pages++;
    1.20 +	}
    1.21  	reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn);
    1.22  
    1.23  	after_bootmem = 1;