Re: [PATCH 1/2] sched/rt: Remove a redundant condition from task_woken_rt()

From: Steven Rostedt
Date: Mon Jul 06 2015 - 15:19:48 EST


On Sat, 4 Jul 2015 15:39:22 +0800
Xunlei Pang <xlpang@xxxxxxx> wrote:

> From: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
>
> 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.
>

Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

-- Steve

> Signed-off-by: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
> ---
> kernel/sched/rt.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 0d193a24..00816ee 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -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 ||

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/