From: Steven Rostedt <rostedt@goodmis.org>
To: Xunlei Pang <pang.xunlei@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@gmail.com>
Subject: Re: [PATCH v3 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()
Date: Thu, 12 Feb 2015 19:04:38 -0500 [thread overview]
Message-ID: <20150212190438.374b8cf2@gandalf.local.home> (raw)
In-Reply-To: <1423410686-1928-2-git-send-email-pang.xunlei@linaro.org>
On Sun, 8 Feb 2015 23:51:26 +0800
Xunlei Pang <pang.xunlei@linaro.org> wrote:
> check_preempt_curr() doesn't call sched_class::check_preempt_curr
> when the class of current is a higher level.
The above sentence does not make sense.
> So if there is a DL
> task running when doing this for RT, check_preempt_equal_prio()
Doing what for RT?
> will definitely miss, which may result in some response latency
Miss what?
> for this RT task if it is pinned and there're some same-priority
> migratable rt tasks already queued.
>
> We should do the similar thing in select_task_rq_rt() when first
> picking rt tasks after running out of DL tasks.
>
> This patch tackles the issue by peeking the next rt task(RT1), and
> if find RT1 migratable, just requeue it to the tail of the rq using
> requeue_task_rt(rq, p, 0). In this way:
> - If there do have another rt task(RT2) with the same priority as
> RT1, RT2 will finally be picked as the running task. While RT1
> will be pushed onto another cpu via RT1's post_schedule(), as
> RT1 is migratable. The difference from check_preempt_equal_prio()
> here is that we just don't care whether RT2 is migratable.
>
> - Otherwise, if there's no rt task with the same priority as RT1,
> RT1 will still be picked as the running task after the requeuing.
What happens if there's three RT tasks of the same prio, RT1 is ready
to run and is migratable, RT2 is pinned, RT3 is migratable
RT1 just got pushed behind RT3 and it is now not the next one to run.
RT2 will get this rq, RT3 will be pushed off, but say there's no more
rq's available to run RT1.
You just broke FIFO.
I'm sorry, I'm thinking this is trying too hard to fix the users poor
management of RT tasks.
If you have 2 or more RT tasks of the same prio, you had better be damn
aware that if one is pinned, it will block the others, even from
migrating. You should not have pinned tasks of the same prio as those
that can migrate.
And if your system depends on DL tasks working nicely with RT tasks on
the same CPU, it's even more broken by design.
-- Steve
next prev parent reply other threads:[~2015-02-13 0:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-08 15:51 [PATCH v3 1/2] sched/rt: Check to push the task when changing its affinity Xunlei Pang
2015-02-08 15:51 ` [PATCH v3 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt() Xunlei Pang
2015-02-13 0:04 ` Steven Rostedt [this message]
2015-02-13 3:55 ` Xunlei Pang
2015-02-13 4:40 ` Xunlei Pang
2015-02-13 5:05 ` Steven Rostedt
[not found] ` <OF7733F37C.3800A165-ON48257DED.000809A5-48257DED.00100D03@zte.com.cn>
2015-02-15 4:23 ` Steven Rostedt
2015-02-12 23:31 ` [PATCH v3 1/2] sched/rt: Check to push the task when changing its affinity Steven Rostedt
2015-02-13 3:38 ` Xunlei Pang
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=20150212190438.374b8cf2@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pang.xunlei@linaro.org \
--cc=peterz@infradead.org \
/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®