SMP - Scheduler can assign process to a cpu

- machine information contains the number of cpus and the bsp id

- a dummy SMP scheduler which keeps all system processes on BSP and
  all other process on APs. The scheduler remembers how many processes
  are assigned to each CPU and always picks the one with the least
  processes for a new process.
This commit is contained in:
Tomas Hruby
2010-09-15 14:10:33 +00:00
parent 9e12630d75
commit 1e273f640e
7 changed files with 81 additions and 1 deletions
+5
View File
@@ -89,6 +89,11 @@ PUBLIC void bsp_finish_booting(void)
#ifdef CONFIG_SMP
cpu_set_flag(bsp_cpu_id, CPU_IS_READY);
machine.processors_count = ncpus;
machine.bsp_id = bsp_cpu_id;
#else
machine.processors_count = 1;
machine.bsp_id = 0;
#endif
switch_to_user();