schedule(): sync CPU_FLAG_NEED_RESCHED flag with clone and migrate

This commit is contained in:
Balazs Gerofi
2015-09-16 19:22:40 +09:00
parent e7b1115572
commit 40b8587a8a
3 changed files with 40 additions and 12 deletions

View File

@ -720,9 +720,12 @@ void handle_interrupt(int vector, struct x86_user_context *regs)
}
}
else if (vector == LOCAL_TIMER_VECTOR) {
unsigned long irqstate;
/* Timer interrupt, enabled only on oversubscribed CPU cores,
* request reschedule */
irqstate = ihk_mc_spinlock_lock(&v->runq_lock);
v->flags |= CPU_FLAG_NEED_RESCHED;
ihk_mc_spinlock_unlock(&v->runq_lock, irqstate);
dkprintf("timer[%lu]: CPU_FLAG_NEED_RESCHED \n", rdtsc());
}
else if (vector >= IHK_TLB_FLUSH_IRQ_VECTOR_START &&