remote TLB invalidation: follow migrated threads by affinity calls
This commit is contained in:
@ -1781,6 +1781,7 @@ static void do_migrate(void)
|
||||
ihk_mc_spinlock_lock_noirq(&cur_v->migq_lock);
|
||||
list_for_each_entry_safe(req, tmp, &cur_v->migq, list) {
|
||||
int cpu_id;
|
||||
int old_cpu_id;
|
||||
struct cpu_local_var *v;
|
||||
|
||||
/* 0. check if migration is necessary */
|
||||
@ -1802,9 +1803,17 @@ static void do_migrate(void)
|
||||
double_rq_lock(cur_v, v);
|
||||
list_del(&req->proc->sched_list);
|
||||
cur_v->runq_len -= 1;
|
||||
old_cpu_id = req->proc->cpu_id;
|
||||
req->proc->cpu_id = cpu_id;
|
||||
list_add_tail(&req->proc->sched_list, &v->runq);
|
||||
v->runq_len += 1;
|
||||
|
||||
/* update cpu_set of the VM for remote TLB invalidation */
|
||||
cpu_clear(old_cpu_id, &req->proc->vm->cpu_set,
|
||||
&req->proc->vm->cpu_set_lock);
|
||||
cpu_set(cpu_id, &req->proc->vm->cpu_set,
|
||||
&req->proc->vm->cpu_set_lock);
|
||||
|
||||
if (v->runq_len == 1)
|
||||
ihk_mc_interrupt_cpu(get_x86_cpu_local_variable(cpu_id)->apic_id, 0xd1);
|
||||
double_rq_unlock(cur_v, v);
|
||||
|
||||
Reference in New Issue
Block a user