Merge "sched/core: Do not free task while holding rq lock"
This commit is contained in:
commit
46c5a88fdf
2 changed files with 6 additions and 2 deletions
|
@ -5600,7 +5600,6 @@ int do_isolation_work_cpu_stop(void *data)
|
||||||
*/
|
*/
|
||||||
nohz_balance_clear_nohz_mask(cpu);
|
nohz_balance_clear_nohz_mask(cpu);
|
||||||
|
|
||||||
clear_hmp_request(cpu);
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -5725,6 +5724,7 @@ int sched_isolate_cpu(int cpu)
|
||||||
|
|
||||||
migrate_sync_cpu(cpu, cpumask_first(&avail_cpus));
|
migrate_sync_cpu(cpu, cpumask_first(&avail_cpus));
|
||||||
stop_cpus(cpumask_of(cpu), do_isolation_work_cpu_stop, 0);
|
stop_cpus(cpumask_of(cpu), do_isolation_work_cpu_stop, 0);
|
||||||
|
clear_hmp_request(cpu);
|
||||||
|
|
||||||
calc_load_migrate(rq);
|
calc_load_migrate(rq);
|
||||||
update_max_interval();
|
update_max_interval();
|
||||||
|
|
|
@ -641,14 +641,18 @@ void clear_hmp_request(int cpu)
|
||||||
clear_boost_kick(cpu);
|
clear_boost_kick(cpu);
|
||||||
clear_reserved(cpu);
|
clear_reserved(cpu);
|
||||||
if (rq->push_task) {
|
if (rq->push_task) {
|
||||||
|
struct task_struct *push_task = NULL;
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&rq->lock, flags);
|
raw_spin_lock_irqsave(&rq->lock, flags);
|
||||||
if (rq->push_task) {
|
if (rq->push_task) {
|
||||||
clear_reserved(rq->push_cpu);
|
clear_reserved(rq->push_cpu);
|
||||||
put_task_struct(rq->push_task);
|
push_task = rq->push_task;
|
||||||
rq->push_task = NULL;
|
rq->push_task = NULL;
|
||||||
}
|
}
|
||||||
rq->active_balance = 0;
|
rq->active_balance = 0;
|
||||||
raw_spin_unlock_irqrestore(&rq->lock, flags);
|
raw_spin_unlock_irqrestore(&rq->lock, flags);
|
||||||
|
if (push_task)
|
||||||
|
put_task_struct(push_task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue