Skip to contentSkip to conversation

sched/rt: Remove a redundant condition from task_woken_rt()

PATCH Steven Rostedt 2 participants 4 messages Jul 6, 2015 – Aug 3, 2015 2 messages not in the archive Scheduler

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Steven Rostedt

author reviewer Acked-by
#1 lore raw
Quoted 6 lines · On Sat, 4 Jul 2015 15:39:22 +0800 Xunlei Pang <[email protected]> wrote:

From: Xunlei Pang <[email protected]>

p has been already queued at this point, so "!task_running(rq, p)" and "p->nr_cpus_allowed > 1" imply that "has_pushable_tasks(rq)" is true, so it can be removed.

-- Steve

Quoted 17 lines
---
 kernel/sched/rt.c | 1 -
 1 file changed, 1 deletion(-)
kernel/sched/rt.c +0 -1
index 0d193a24..00816ee 100644
@@ -2069,7 +2069,6 @@ 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 ||

A message that is not in the archive (sent off-list or not yet received): [email protected]

author reviewer Acked-by
#3 lore raw

Re: [PATCH 2/2] sched/deadline: Remove a redundant condition from task_woken_dl()

Quoted 5 lines · On Sat, 4 Jul 2015 15:39:23 +0800 Xunlei Pang <[email protected]> wrote:

From: Xunlei Pang <[email protected]>

p has been already queued at this point, so "!task_running(rq, p)" and "p->nr_cpus_allowed > 1" imply that "has_pushable_dl_tasks(rq)" is true, so it can be removed.

-- Steve

Quoted 18 lines
---
 kernel/sched/deadline.c | 1 -
 1 file changed, 1 deletion(-)
kernel/sched/deadline.c +0 -1
index 0a17af35..20772ee 100644
@@ -1657,7 +1657,6 @@ static void task_woken_dl(struct rq *rq, struct task_struct *p)
 {
 	if (!task_running(rq, p) &&
 	    !test_tsk_need_resched(rq->curr) &&
-	    has_pushable_dl_tasks(rq) &&
 	    p->nr_cpus_allowed > 1 &&
 	    dl_task(rq->curr) &&
 	    (rq->curr->nr_cpus_allowed < 2 ||
#4 lore raw

[tip:sched/core] sched/deadline: Remove a redundant condition from task_woken_dl()

In reply to a message not in the archive
sched/deadline: Remove a redundant condition from task_woken_dl()
Commit-ID:  3fe33bcdd358dd8c641cf4d92c9d2d9972ca94dd
Gitweb:     http://git.kernel.org/tip/3fe33bcdd358dd8c641cf4d92c9d2d9972ca94dd
Author:     Xunlei Pang <[email protected]>
AuthorDate: Sat, 4 Jul 2015 15:39:23 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 3 Aug 2015 12:21:20 +0200

sched/deadline: Remove a redundant condition from task_woken_dl()

'p' has been already queued at this point, so "!task_running(rq, p)" and "p->nr_cpus_allowed > 1" imply that "has_pushable_dl_tasks(rq)" is true, so it can be removed.

---
 kernel/sched/deadline.c | 1 -
 1 file changed, 1 deletion(-)
kernel/sched/deadline.c +0 -1
index 0a17af35..20772ee 100644
@@ -1657,7 +1657,6 @@ static void task_woken_dl(struct rq *rq, struct task_struct *p)
 {
 	if (!task_running(rq, p) &&
 	    !test_tsk_need_resched(rq->curr) &&
-	    has_pushable_dl_tasks(rq) &&
 	    p->nr_cpus_allowed > 1 &&
 	    dl_task(rq->curr) &&
 	    (rq->curr->nr_cpus_allowed < 2 ||
#5 lore raw
In reply to a message not in the archive
sched/rt: Remove a redundant condition from task_woken_rt()
Commit-ID:  8fd373548eed815858d7b5534971bdc64b4d8d2c
Gitweb:     http://git.kernel.org/tip/8fd373548eed815858d7b5534971bdc64b4d8d2c
Author:     Xunlei Pang <[email protected]>
AuthorDate: Sat, 4 Jul 2015 15:39:22 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 3 Aug 2015 12:21:19 +0200

sched/rt: Remove a redundant condition from task_woken_rt()

'p' has been already queued at this point, so "!task_running(rq, p)" and "p->nr_cpus_allowed > 1" imply that "has_pushable_tasks(rq)" is true, so it can be removed.

---
 kernel/sched/rt.c | 1 -
 1 file changed, 1 deletion(-)
kernel/sched/rt.c +0 -1
index 0d193a24..00816ee 100644
@@ -2069,7 +2069,6 @@ 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 ||