diff options
author | Andy Whitcroft <apw@canonical.com> | 2009-12-23 16:43:07 +0000 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2011-07-25 14:35:05 -0600 |
commit | ef5e283b3603cd0da7771ecffec073b3feb47b7b (patch) | |
tree | 22d3c57c7c0151dbe2d0b9f5b7f50c61d14ec045 /init | |
parent | 516bdb082be5ddfb42b6f2d6c96901c70300a1f7 (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.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 22712f94e82..1ecfa056c48 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); |