mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 07:03:37 +02:00
parent
abd13b690f
commit
31a4e0d240
|
|
@ -3164,6 +3164,10 @@ static void pull_task(struct rq *src_rq, struct task_struct *p,
|
|||
deactivate_task(src_rq, p, 0);
|
||||
set_task_cpu(p, this_cpu);
|
||||
activate_task(this_rq, p, 0);
|
||||
/*
|
||||
* Note that idle threads have a prio of MAX_PRIO, for this test
|
||||
* to be always true for them.
|
||||
*/
|
||||
check_preempt_curr(this_rq, p, 0);
|
||||
}
|
||||
|
||||
|
|
@ -6958,6 +6962,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
|
|||
__sched_fork(idle);
|
||||
idle->se.exec_start = sched_clock();
|
||||
|
||||
idle->prio = idle->normal_prio = MAX_PRIO;
|
||||
cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu));
|
||||
__set_task_cpu(idle, cpu);
|
||||
|
||||
|
|
@ -7661,6 +7666,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
|
|||
spin_lock_irq(&rq->lock);
|
||||
update_rq_clock(rq);
|
||||
deactivate_task(rq, rq->idle, 0);
|
||||
rq->idle->static_prio = MAX_PRIO;
|
||||
__setscheduler(rq, rq->idle, SCHED_NORMAL, 0);
|
||||
rq->idle->sched_class = &idle_sched_class;
|
||||
migrate_dead_tasks(cpu);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user