From: Steven Rostedt <rostedt@goodmis.org>
To: Xunlei Pang <xlpang@126.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@gmail.com>, Ingo Molnar <mingo@redhat.com>,
Xunlei Pang <pang.xunlei@linaro.org>
Subject: Re: [PATCH 2/2] sched/rt: Optimizate task_woken_rt()
Date: Thu, 30 Apr 2015 13:01:43 -0400 [thread overview]
Message-ID: <20150430130143.46bd8d43@gandalf.local.home> (raw)
In-Reply-To: <1430411598-4904-2-git-send-email-xlpang@126.com>
On Fri, 1 May 2015 00:33:18 +0800
Xunlei Pang <xlpang@126.com> wrote:
> 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)".
This makes sense.
>
> - 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.
But doesn't that happen when we schedule?
-- Steve
>
> 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 ||
next prev parent reply other threads:[~2015-04-30 17:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 16:33 [PATCH 1/2] sched/rt: Check to push task away when its affinity is changed Xunlei Pang
2015-04-30 16:33 ` [PATCH 2/2] sched/rt: Optimizate task_woken_rt() Xunlei Pang
2015-04-30 17:01 ` Steven Rostedt [this message]
[not found] ` <OF5CB344CD.C36F5E18-ON48257E38.0009F380-48257E38.000B4644@zte.com.cn>
2015-05-01 2:52 ` Steven Rostedt
2015-04-30 17:05 ` [PATCH 1/2] sched/rt: Check to push task away when its affinity is changed Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150430130143.46bd8d43@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pang.xunlei@linaro.org \
--cc=peterz@infradead.org \
--cc=xlpang@126.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®