ia64/xen-unstable

changeset 9189:f55d6c299c7e

Keep totalram_pages in sync with current_pages in balloon driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 08 11:51:17 2006 +0100 (2006-03-08)
parents 6cc6b0ec9fa5
children 3219aa25ad46
files linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Mar 08 11:48:34 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Mar 08 11:51:17 2006 +0100
     1.3 @@ -468,6 +468,7 @@ static int __init balloon_init(void)
     1.4  		return -1;
     1.5  
     1.6  	current_pages = min(xen_start_info->nr_pages, max_pfn);
     1.7 +	totalram_pages = current_pages;
     1.8  	target_pages  = current_pages;
     1.9  	balloon_low   = 0;
    1.10  	balloon_high  = 0;
    1.11 @@ -547,6 +548,7 @@ struct page *balloon_alloc_empty_page_ra
    1.12  		&init_mm, vstart, PAGE_SIZE << order, dealloc_pte_fn, NULL);
    1.13  	BUG_ON(ret);
    1.14  	current_pages -= 1UL << order;
    1.15 +	totalram_pages = current_pages;
    1.16  	balloon_unlock(flags);
    1.17  
    1.18  	schedule_work(&balloon_worker);