aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Liu <[email protected]>2013-02-22 16:33:54 -0800
committerLinus Torvalds <[email protected]>2013-02-23 17:50:15 -0800
commit306f2e9eed173c5b8f3318e36cf92a7df3c3f6d5 (patch)
treede79719e5906203c2bc9560875243c21784d67f2
parentb40da04946aa7b603b2aa4dd479f83b2c9090d96 (diff)
mm: set zone->present_pages to number of existing pages in the zone
Now all users of "number of pages managed by the buddy system" have been converted to use zone->managed_pages, so set zone->present_pages to what it should be: present_pages = spanned_pages - absent_pages; Signed-off-by: Jiang Liu <[email protected]> Cc: Wen Congyang <[email protected]> Cc: David Rientjes <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Maciej Rutecki <[email protected]> Cc: Chris Clayton <[email protected]> Cc: "Rafael J . Wysocki" <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Jianguo Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5f73106bd8dd..07fe78d01ffd 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4650,7 +4650,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
nr_all_pages += freesize;
zone->spanned_pages = size;
- zone->present_pages = freesize;
+ zone->present_pages = realsize;
/*
* Set an approximate value for lowmem here, it will be adjusted
* when the bootmem allocator frees pages into the buddy system.