summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-05-23 22:04:21 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-24 18:56:07 +0200
commitf7232154198f928fc25f420d6190468212a7632a (patch)
tree3216938f94face00fd6c6094bc8ccb66c2ef3619 /mm/page_alloc.c
parentMAINTAINERS: add util-linux-ng package (diff)
downloadlinux-f7232154198f928fc25f420d6190468212a7632a.tar.xz
linux-f7232154198f928fc25f420d6190468212a7632a.zip
mm: don't drop a partial page in a zone's memory map size
In a zone's present pages number, account for all pages occupied by the memory map, including a partial. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 63835579323a..035300299f94 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3378,7 +3378,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
* is used by this zone for memmap. This affects the watermark
* and per-cpu initialisations
*/
- memmap_pages = (size * sizeof(struct page)) >> PAGE_SHIFT;
+ memmap_pages =
+ PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT;
if (realsize >= memmap_pages) {
realsize -= memmap_pages;
printk(KERN_DEBUG