diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2016-12-07 16:36:14 -0800 |
|---|---|---|
| committer | Olav Haugan <ohaugan@codeaurora.org> | 2016-12-09 13:45:42 -0800 |
| commit | 8cf404403a00039b63859397e269b7fe26bd2bef (patch) | |
| tree | 0391eaa3c55112ffbbaa2f7387547d6292e077f0 /kernel | |
| parent | 584d38f189e1f88db447c5baa6f5473294124701 (diff) | |
sched/core: Fix race condition in clearing hmp request
There is a race condition between clearing an HMP request for active
migration and the actual active migration. Active migration can he
half-way through doing the migration when the HMP request can be cleared
by another core. Move clearing of HMP request to the stopper thread to
avoid this.
Change-Id: I6d73b8f246ae3754ab60984af198333fd284ae16
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index d59cae164431..13990fa6f9cf 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5609,6 +5609,7 @@ int do_isolation_work_cpu_stop(void *data) */ nohz_balance_clear_nohz_mask(cpu); + clear_hmp_request(cpu); local_irq_enable(); return 0; } @@ -5733,7 +5734,6 @@ int sched_isolate_cpu(int cpu) migrate_sync_cpu(cpu, cpumask_first(&avail_cpus)); stop_cpus(cpumask_of(cpu), do_isolation_work_cpu_stop, 0); - clear_hmp_request(cpu); calc_load_migrate(rq); update_max_interval(); |
