SMP - CPU local run queues
- each CPU has its own runqueues
- processes on BSP are put on the runqueues later after a switch to
the final stack when cpuid works to avoid special cases
- enqueue() and dequeue() use the run queues of the cpu the process is
assigned to
- pick_proc() uses the local run queues
- printing of per-CPU run queues ('2') on serial console
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
@@ -68,6 +69,10 @@ DECLARE_CPULOCAL(int, pagefault_handled);
|
||||
*/
|
||||
DECLARE_CPULOCAL(struct proc *, ptproc);
|
||||
|
||||
/* CPU private run queues */
|
||||
DECLARE_CPULOCAL(struct proc *, run_q_head[NR_SCHED_QUEUES]); /* ptrs to ready list headers */
|
||||
DECLARE_CPULOCAL(struct proc *, run_q_tail[NR_SCHED_QUEUES]); /* ptrs to ready list tails */
|
||||
|
||||
DECLARE_CPULOCAL_END
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
Reference in New Issue
Block a user