aboutsummaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorSurbhi Palande <surbhi.palande@canonical.com>2009-12-08 11:44:34 +0200
committerJohn Rigby <john.rigby@linaro.org>2012-06-25 15:02:07 -0600
commitf560aad1f0f57fdb0da87cc5023ca9ae3e3dc656 (patch)
tree7ebb6b51a0478aa8221c3ac11c6452a71617efa5 /init/main.c
parent5700f7a09765fffabc796d1d6a187604fe6f9415 (diff)
UBUNTU: SAUCE: Make populate_rootfs asynchronous
The expansion of the initramfs is completely independant of other boot activities. The original data is already present at boot and the filesystem is not required until we are ready to start init. It is therefore reasonable to populate the rootfs asynchronously. Move this processing to an async call. This reduces kernel initialisation time (the time from bootloader to starting userspace) by several 10ths of a second on a selection of test hardware particularly SMP systems, although UP system also benefit. Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 0af72b99d00..b0751f0bfe0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -871,6 +871,12 @@ static int __init kernel_init(void * unused)
(void) sys_dup(0);
(void) sys_dup(0);
/*
+ * We need to ensure that the filesystem is ready by this point, wait for
+ * async_populate_rootfs to complete.
+ */
+ async_synchronize_full_domain(&populate_rootfs_domain);
+
+ /*
* check if there is an early userspace init. If yes, let it do all
* the work
*/