schedule: migration free last thread if terminated
This commit is contained in:
@ -2613,15 +2613,14 @@ redo:
|
|||||||
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),
|
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),
|
||||||
cpu_local_var(runq_irqstate));
|
cpu_local_var(runq_irqstate));
|
||||||
|
|
||||||
/* Have we migrated to another core meanwhile? */
|
|
||||||
if (v != get_this_cpu_local_var()) {
|
|
||||||
dkprintf("migrated, skipping freeing last\n");
|
|
||||||
goto redo;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((last != NULL) && (last->status == PS_EXITED)) {
|
if ((last != NULL) && (last->status == PS_EXITED)) {
|
||||||
release_thread(last);
|
release_thread(last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Have we migrated to another core meanwhile? */
|
||||||
|
if (v != get_this_cpu_local_var()) {
|
||||||
|
goto redo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),
|
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),
|
||||||
|
|||||||
Reference in New Issue
Block a user