[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip: sched/core] sched/rt: Allow pulling unfitting task
The following commit has been merged into the sched/core branch of tip:

Commit-ID: 98ca645f824301bde72e0a51cdc8bdbbea6774a5
Author: Qais Yousef <>
AuthorDate: Mon, 02 Mar 2020 13:27:19
Committer: Ingo Molnar <>
CommitterDate: Fri, 06 Mar 2020 12:57:28 +01:00

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.

Suggested-by: Steven Rostedt <>
Signed-off-by: Qais Yousef <>
Signed-off-by: Peter Zijlstra (Intel) <>
Signed-off-by: Ingo Molnar <>
Fixes: 804d402fb6f6 ("sched/rt: Make RT capacity-aware")
kernel/sched/rt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 29a8695..bcb1436 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;
 \ /
  Last update: 2020-03-06 15:42    [W:0.143 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site