summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorAndrew Morton2006-06-23 11:03:47 +0200
committerLinus Torvalds2006-06-23 16:42:52 +0200
commitbd1e22b8e0a90f9a91e4c27db14ca15773659bf7 (patch)
tree8d32bdc39977af9dd3ba577b1fa34c0106b7f18e /mm/page_alloc.c
parent[PATCH] mm/slab.c: fix early init assumption (diff)
downloadkernel-qcow2-linux-bd1e22b8e0a90f9a91e4c27db14ca15773659bf7.tar.gz
kernel-qcow2-linux-bd1e22b8e0a90f9a91e4c27db14ca15773659bf7.tar.xz
kernel-qcow2-linux-bd1e22b8e0a90f9a91e4c27db14ca15773659bf7.zip
[PATCH] initialise total_memory() earlier
Initialise total_memory earlier in boot. Because if for some reason we run page reclaim early in boot, we don't want total_memory to be zero when we use it as a divisor. And rename total_memory to vm_total_pages to avoid naming clashes with architectures. Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Martin Bligh <mbligh@google.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5af33186a25f..71a0b2a23f5b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1725,9 +1725,9 @@ void __meminit build_all_zonelists(void)
stop_machine_run(__build_all_zonelists, NULL, NR_CPUS);
/* cpuset refresh routine should be here */
}
-
- printk("Built %i zonelists\n", num_online_nodes());
-
+ vm_total_pages = nr_free_pagecache_pages();
+ printk("Built %i zonelists. Total pages: %ld\n",
+ num_online_nodes(), vm_total_pages);
}
/*