Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf40440 authored by Olav Haugan's avatar Olav Haugan
Browse files

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: default avatarOlav Haugan <ohaugan@codeaurora.org>
parent 584d38f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();