diff options
author | Jan Beulich <JBeulich@novell.com> | 2009-09-21 20:03:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:38 -0400 |
commit | 4481374ce88ba8f460c8b89f2572027bd27057d0 (patch) | |
tree | 6896601b6a1da0e3e932ffa75fcff966c834c02c /init/main.c | |
parent | 4738e1b9cf8f9e28d7de080a5e6ce5d0095ea18f (diff) |
mm: replace various uses of num_physpages by totalram_pages
Sizing of memory allocations shouldn't depend on the number of physical
pages found in a system, as that generally includes (perhaps a huge amount
of) non-RAM pages. The amount of what actually is usable as storage
should instead be used as a basis here.
Some of the calculations (i.e. those not intending to use high memory)
should likely even use (totalram_pages - totalhigh_pages).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c index 34971becbd3c..2c48c3153163 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -668,12 +668,12 @@ asmlinkage void __init start_kernel(void) | |||
668 | #endif | 668 | #endif |
669 | thread_info_cache_init(); | 669 | thread_info_cache_init(); |
670 | cred_init(); | 670 | cred_init(); |
671 | fork_init(num_physpages); | 671 | fork_init(totalram_pages); |
672 | proc_caches_init(); | 672 | proc_caches_init(); |
673 | buffer_init(); | 673 | buffer_init(); |
674 | key_init(); | 674 | key_init(); |
675 | security_init(); | 675 | security_init(); |
676 | vfs_caches_init(num_physpages); | 676 | vfs_caches_init(totalram_pages); |
677 | radix_tree_init(); | 677 | radix_tree_init(); |
678 | signals_init(); | 678 | signals_init(); |
679 | /* rootfs populating might need page-writeback */ | 679 | /* rootfs populating might need page-writeback */ |