aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQais Yousef <[email protected]>2020-03-02 13:27:19 +0000
committerIngo Molnar <[email protected]>2020-03-06 12:57:28 +0100
commit98ca645f824301bde72e0a51cdc8bdbbea6774a5 (patch)
treee9777780f3c457a6ef1a703c34ce4859f58de589
parenta1bd02e1f28b1939cac8c64072a0e578c3cbc345 (diff)
sched/rt: Allow pulling unfitting task
When implemented RT Capacity Awareness; the logic was done such that if a task was running on a fitting CPU, then it was sticky and we would try our best to keep it there. But as Steve suggested, to adhere to the strict priority rules of RT class; allow pulling an RT task to unfitting CPU to ensure it gets a chance to run ASAP. LINK: https://lore.kernel.org/lkml/[email protected]/ Suggested-by: Steven Rostedt <[email protected]> Signed-off-by: Qais Yousef <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware") Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r--kernel/sched/rt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 29a86959bda4..bcb143661a86 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1656,8 +1656,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
{
if (!task_running(rq, p) &&
- cpumask_test_cpu(cpu, p->cpus_ptr) &&
- rt_task_fits_capacity(p, cpu))
+ cpumask_test_cpu(cpu, p->cpus_ptr))
return 1;
return 0;