aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-12-23 16:43:07 +0000
committerJohn Rigby <john.rigby@linaro.org>2012-06-20 20:13:57 -0600
commit24247838a0472eeddc25a808759e041862247f66 (patch)
tree0154abf550f88a98aea6b19cd521a21ec48da7e9 /init
parenteb40fa376dba7256fc479ca46c4d55594cdd7a4f (diff)
UBUNTU: SAUCE: async_populate_rootfs: move rootfs init earlier
Check to see if the machine has more than one active CPU, if it does then it is worth starting the decode of the rootfs earlier. Signed-off-by: Andy Whitcroft <apw@canonical.com>
Diffstat (limited to 'init')
-rw-r--r--init/initramfs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 39dbed3ad9c..91312f76e1c 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -612,9 +612,22 @@ static void __init async_populate_rootfs(void)
return;
}
+static int __initdata rootfs_populated;
+
+static int __init populate_rootfs_early(void)
+{
+ if (num_online_cpus() > 1) {
+ rootfs_populated = 1;
+ async_schedule_domain(async_populate_rootfs, NULL,
+ &populate_rootfs_domain);
+ }
+}
static int __init populate_rootfs(void)
{
- async_schedule_domain(async_populate_rootfs, NULL, &populate_rootfs_domain);
+ if (!rootfs_populated)
+ async_schedule_domain(async_populate_rootfs, NULL,
+ &populate_rootfs_domain);
}
+earlyrootfs_initcall(populate_rootfs_early);
rootfs_initcall(populate_rootfs);