History

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.

Qais Yousef committed 6 years ago

Commit 98ca6451 parent a1bd02e1 file · +1 −2Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/sched/rt.c+1−2
@@ -1656,8 +1656,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) · 1655 unmodified lines
1656static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)1656static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
1657{1657{
1658 if (!task_running(rq, p) &&1658 if (!task_running(rq, p) &&
1659 cpumask_test_cpu(cpu, p->cpus_ptr) &&1659 cpumask_test_cpu(cpu, p->cpus_ptr))
1660 rt_task_fits_capacity(p, cpu))
1661 return 1;1660 return 1;
1662 1661
1663 return 0;1662 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t