summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2011-05-24 17:12:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 08:39:21 -0700
commitde03c72cfce5b263a674d04348b58475ec50163c (patch)
treee2b035234440bcd1aa88078c3f9c8457d461ef9c /init
parent692e0b35427a088bf75d9363788c61c7edbe93a5 (diff)
downloadlinux-stable-de03c72cfce5b263a674d04348b58475ec50163c.tar.gz
linux-stable-de03c72cfce5b263a674d04348b58475ec50163c.tar.bz2
linux-stable-de03c72cfce5b263a674d04348b58475ec50163c.zip
mm: convert mm->cpu_vm_cpumask into cpumask_var_t
cpumask_t is very big struct and cpu_vm_mask is placed wrong position. It might lead to reduce cache hit ratio. This patch has two change. 1) Move the place of cpumask into last of mm_struct. Because usually cpumask is accessed only front bits when the system has cpu-hotplug capability 2) Convert cpu_vm_mask into cpumask_var_t. It may help to reduce memory footprint if cpumask_size() will use nr_cpumask_bits properly in future. In addition, this patch change the name of cpu_vm_mask with cpu_vm_mask_var. It may help to detect out of tree cpu_vm_mask users. This patch has no functional change. [akpm@linux-foundation.org: build fix] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Hugh Dickins <hughd@google.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 48df882d51d2..22da33918aef 100644
--- a/init/main.c
+++ b/init/main.c
@@ -509,6 +509,8 @@ asmlinkage void __init start_kernel(void)
sort_main_extable();
trap_init();
mm_init();
+ BUG_ON(mm_init_cpumask(&init_mm, 0));
+
/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()