sched/rt: Do not try to push tasks if pinned task switches to RT
Quoted 25 lines
From: Libo Chen <[email protected]>
Quoted 19 lines · Kirill Tkhai
Just switched pinned task is not able to be pushed. If the rq had had several RT tasks before they have already been considered as candidates to be pushed (or pulled).
Signed-off-by Kirill V Tkhai <[email protected]>CC Steven Rostedt <[email protected]>CC Ingo Molnar <[email protected]>CC Peter Zijlstra <[email protected]>CC linux-rt-users <[email protected]>---
kernel/sched/rt.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)kernel/sched/rt.c +0
-0@@ -1925,9 +1925,9 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)*/ if (p->on_rq && rq->curr != p) {
Quoted 8 lines
kernel/sched/rt.c static void switched_to_rt(struct rq *rq, struct task_struct *p) · line 1930
Quoted 6 lines
kernel/sched/rt.c +2
-2#ifdef CONFIG_SMP -if (rq->rt.overloaded &&push_rt_task (rq) && +if (rq->rt.overloaded && p->nr_cpus_allowed >1 &&/* Don't resched if we changed runqueues */ - rq !=task_rq (p)) +push_rt_task (rq) && rq !=task_rq (p))I think you worry about it was excess to call
push_rt_task, since the task of p->nr_cpus_allowed=1 can`t be pushed. is that right?
Sure.
Quoted 2 lines
The task of
p->nr_cpus_allowed=1 would`t be added topushable_taskslist (see the enqueue_task_rt())and thispush_rt_task()need to push other tasks when rt.overloaded.
If rq has already had 2 or more pushable tasks and we try to add a pinned task then call of push_rt_task will just waste a time.
Quoted 10 lines
So I don`t agree this patch.
Quoted 7 lines
kernel/sched/rt.c +0
-1check_resched =0 ;#endif /* CONFIG_SMP */ if (check_resched && p->prio < rq->curr->prio) --To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Quoted 5 lines · Kirill Tkhai
Quoted 2 lines
The task of
p->nr_cpus_allowed=1 would`t be added topushable_taskslist (see the enqueue_task_rt())and thispush_rt_task()need to push other tasks when rt.overloaded.If rq has already had 2 or more pushable tasks and we try to add a pinned task then call of
push_rt_taskwill just waste a time.
Correct, I just have some minor comments about the patch.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html