2009年9月7日月曜日

smp_prepare_boot_cp(パス)

次に来るsmp_prepare_boot_cpはSMP構成のみ有効になるコードなのでパスします。
start_kernelの次の部分を見てみましょう。

=====
/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()
* time - but meanwhile we still have a functioning scheduler.
*/
sched_init();
=====

スケジューラの初期化です。
実体はkernel/sched.cにありますが、大きな関数なのでスケジューラ関係は
別の機会にまとめて見てみようと思います。
なのでその次。

=====
/*
* Disable preemption - early bootup scheduling is extremely
* fragile until we cpu_idle() for the first time.
*/
preempt_disable();
build_all_zonelists();
page_alloc_init();
printk(KERN_NOTICE "Kernel command line: %s¥n", boot_command_line);
parse_early_param();
parse_args("Booting kernel", static_command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);
if (!irqs_disabled()) {
printk(KERN_WARNING "start_kernel(): bug: interrupts were "
"enabled *very* early, fixing it¥n");
local_irq_disable();
}
sort_main_extable();
trap_init();
rcu_init();

=====

次回から1つずつ追っていこうと思います。

0 件のコメント:

コメントを投稿