lkml.org 
[lkml]   [2011]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC] sched: clean up RT task_woken
From
Hi Steven

Cleanup is made for task_woken_rt(), as the following

#1 p->rt.nr_cpus_allowed > 1
Since @rq is checked to has pushable tasks, @p is covered by the check.
And if only @p is considered to be pushed, @p may be not the highest next.

#2 rt_task(rq->curr)
Since curr is checked not to be rescheduled, curr must be RT task.

#3 rq->curr->rt.nr_cpus_allowed < 2
Since running task is never pushed even if pushable.

#4 rq->curr->prio < p->prio
Since curr is checked not to be rescheduled.


Hillf
---
kernel/sched_rt.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 97540f0..7e6349f 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1577,11 +1577,7 @@ static void task_woken_rt(struct rq *rq, struct
task_struct *p)
{
if (!task_running(rq, p) &&
!test_tsk_need_resched(rq->curr) &&
- has_pushable_tasks(rq) &&
- p->rt.nr_cpus_allowed > 1 &&
- rt_task(rq->curr) &&
- (rq->curr->rt.nr_cpus_allowed < 2 ||
- rq->curr->prio < p->prio))
+ has_pushable_tasks(rq))
push_rt_tasks(rq);
}

\
 
 \ /
  Last update: 2011-07-15 16:45    [W:0.021 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site