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

Commit c2e42230 authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa Committed by Satya Durga Srinivasu Prabhala
Browse files

sched: Fix CPU selection when all online CPUs are isolated



After the introduction of "33c24b sched: add cpu isolation support"
select_fallback_rq() might sometimes be unable find any CPU to place
a task on. This happens when the all online CPUs are isolated and
the allow isolated flag is set to false. In such cases, we have
little choice but to use an isolated CPU and wait for core control
to eventually un-isolate one or more online CPUs.

Change-Id: I678a0956f4fbc953b902994d687e0507ffd71f3a
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 07a16a8c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1468,7 +1468,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p, bool allow_iso)
{
	int nid = cpu_to_node(cpu);
	const struct cpumask *nodemask = NULL;
	enum { cpuset, possible, fail } state = cpuset;
	enum { cpuset, possible, fail, bug } state = cpuset;
	int dest_cpu;
	int isolated_candidate = -1;

@@ -1524,6 +1524,11 @@ static int select_fallback_rq(int cpu, struct task_struct *p, bool allow_iso)
			break;

		case fail:
			allow_iso = true;
			state = bug;
			break;

		case bug:
			BUG();
			break;
		}