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

Commit 0abe6676 authored by Qais Yousef's avatar Qais Yousef
Browse files

UPSTREAM: sched/rt: cpupri_find: Implement fallback mechanism for !fit case



When searching for the best lowest_mask with a fitness_fn passed, make
sure we record the lowest_level that returns a valid lowest_mask so that
we can use that as a fallback in case we fail to find a fitting CPU at
all levels.

The intention in the original patch was not to allow a down migration to
unfitting CPU. But this missed the case where we are already running on
unfitting one.

With this change now RT tasks can still move between unfitting CPUs when
they're already running on such CPU.

And as Steve suggested; to adhere to the strict priority rules of RT, if
a task is already running on a fitting CPU but due to priority it can't
run on it, allow it to downmigrate to unfitting CPU so it can run.

Bug: 120440300
Reported-by: default avatarPavan Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware")
Link: https://lkml.kernel.org/r/20200302132721.8353-2-qais.yousef@arm.com
Link: https://lore.kernel.org/lkml/20200203142712.a7yvlyo2y3le5cpn@e107158-lin/


(cherry picked from commit d9cb236b9429044dc694ea70a50163ddd283cea6)
Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
Change-Id: Ifa10286907644a01e75e37c9f523188fd7b43469
parent 7e27ee5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment