aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-01-07 11:45:46 -0500
committerArjan van de Ven <arjan@linux.intel.com>2009-01-07 11:45:46 -0500
commit22a9d645677feefd402befd02edd59b122289ef1 (patch)
tree9f1215cc8f7f0e1c36b03882b2926cc26ccfa5ff /init/main.c
parentede6f5aea054d3fb67c78857f7abdee602302043 (diff)
async: Asynchronous function calls to speed up kernel boot
Right now, most of the kernel boot is strictly synchronous, such that various hardware delays are done sequentially. In order to make the kernel boot faster, this patch introduces infrastructure to allow doing some of the initialization steps asynchronously, which will hide significant portions of the hardware delays in practice. In order to not change device order and other similar observables, this patch does NOT do full parallel initialization. Rather, it operates more in the way an out of order CPU does; the work may be done out of order and asynchronous, but the observable effects (instruction retiring for the CPU) are still done in the original sequence. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index b5a892c6837..f66715d8a85 100644
--- a/init/main.c
+++ b/init/main.c
@@ -62,6 +62,7 @@
62#include <linux/signal.h> 62#include <linux/signal.h>
63#include <linux/idr.h> 63#include <linux/idr.h>
64#include <linux/ftrace.h> 64#include <linux/ftrace.h>
65#include <linux/async.h>
65#include <trace/boot.h> 66#include <trace/boot.h>
66 67
67#include <asm/io.h> 68#include <asm/io.h>
@@ -684,7 +685,7 @@ asmlinkage void __init start_kernel(void)
684 rest_init(); 685 rest_init();
685} 686}
686 687
687static int initcall_debug; 688int initcall_debug;
688core_param(initcall_debug, initcall_debug, bool, 0644); 689core_param(initcall_debug, initcall_debug, bool, 0644);
689 690
690int do_one_initcall(initcall_t fn) 691int do_one_initcall(initcall_t fn)
@@ -785,6 +786,8 @@ static void run_init_process(char *init_filename)
785 */ 786 */
786static noinline int init_post(void) 787static noinline int init_post(void)
787{ 788{
789 /* need to finish all async __init code before freeing the memory */
790 async_synchronize_full();
788 free_initmem(); 791 free_initmem();
789 unlock_kernel(); 792 unlock_kernel();
790 mark_rodata_ro(); 793 mark_rodata_ro();