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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user