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-21 17:21:46 -0600
commitf5a217d53830caad6de90988787e4d7c4df61407 (patch)
tree5df3db5587a9947cfc30f7291c88cdf50d09255c /init
parentfca6fd25ab548b718f514fd3df72d7838ef499fb (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 928a3f2b81d..1ae8873570c 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -622,9 +622,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);