schedule(): hold runq lock for the entire duration of context switching
releasing the runq lock after loading page tables but before the actual context switch can leave execution in an inconsistent if the current process is descheduled from an IRQ between these two steps. this patch holds the runq lock with IRQs disabled and makes the context switch a single atomic operation.
This commit is contained in:
@@ -46,6 +46,7 @@ struct cpu_local_var {
|
||||
struct process_vm idle_vm;
|
||||
|
||||
ihk_spinlock_t runq_lock;
|
||||
unsigned long runq_irqstate;
|
||||
struct process *current;
|
||||
struct list_head runq;
|
||||
size_t runq_len;
|
||||
|
||||
Reference in New Issue
Block a user