keep track of IRQ context and don't do thread migration there

This commit is contained in:
Balazs Gerofi
2015-07-23 16:55:46 +09:00
parent 54eb345847
commit 3988b0fc61
3 changed files with 7 additions and 1 deletions

View File

@ -610,6 +610,9 @@ extern void tlb_flush_handler(int vector);
void handle_interrupt(int vector, struct x86_user_context *regs) void handle_interrupt(int vector, struct x86_user_context *regs)
{ {
struct ihk_mc_interrupt_handler *h; struct ihk_mc_interrupt_handler *h;
struct cpu_local_var *v = get_this_cpu_local_var();
v->in_interrupt = 1;
lapic_ack(); lapic_ack();
@ -680,6 +683,8 @@ void handle_interrupt(int vector, struct x86_user_context *regs)
check_signal(0, regs, 0); check_signal(0, regs, 0);
check_need_resched(); check_need_resched();
v->in_interrupt = 0;
} }
void gpe_handler(struct x86_user_context *regs) void gpe_handler(struct x86_user_context *regs)

View File

@ -67,6 +67,7 @@ struct cpu_local_var {
ihk_spinlock_t migq_lock; ihk_spinlock_t migq_lock;
struct list_head migq; struct list_head migq;
int in_interrupt;
} __attribute__((aligned(64))); } __attribute__((aligned(64)));

View File

@ -2293,7 +2293,7 @@ redo:
ihk_mc_spinlock_unlock(&(v->runq_lock), irqstate); ihk_mc_spinlock_unlock(&(v->runq_lock), irqstate);
} }
if (v->flags & CPU_FLAG_NEED_MIGRATE) { if (v->flags & CPU_FLAG_NEED_MIGRATE && !v->in_interrupt) {
v->flags &= ~CPU_FLAG_NEED_MIGRATE; v->flags &= ~CPU_FLAG_NEED_MIGRATE;
do_migrate(); do_migrate();
goto redo; goto redo;