lkml.org 
[lkml]   [2015]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] sched/rt: Optimizate task_woken_rt()
Date
From: Xunlei Pang <pang.xunlei@linaro.org>

- Remove "has_pushable_tasks(rq)" condition, because for queued p,
"!task_running(rq, p)" and "p->nr_cpus_allowed > 1" implies true
"has_pushable_tasks(rq)".

- Remove "!test_tsk_need_resched(rq->curr)" condition, because
the flag might be set right before the waking up, but we still
need to push equal or lower priority tasks, it should be removed.
Without this condition, we actually get the right logic.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
kernel/sched/rt.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index a9d33a3..9d735da 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2233,8 +2233,6 @@ out:
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->nr_cpus_allowed > 1 &&
(dl_task(rq->curr) || rt_task(rq->curr)) &&
(rq->curr->nr_cpus_allowed < 2 ||
--
1.9.1



\
 
 \ /
  Last update: 2015-04-30 19:41    [W:1.378 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site