From: Kuyo Chang <kuyo.chang@mediatek.com>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
"Valentin Schneider" <vschneid@redhat.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
jstultz <jstultz@google.com>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: Re: [RFC PATCH 1/1] sched/deadline: Fix RT task potential starvation when expiry time passed
Date: Sat, 21 Jun 2025 10:55:16 +0800 [thread overview]
Message-ID: <a1103727ffaaf5f4d1b077bc09a3cc5168c5708d.camel@mediatek.com> (raw)
In-Reply-To: <aFV8qeH__bw0chWM@jlelli-thinkpadt14gen4.remote.csb>
On Fri, 2025-06-20 at 17:22 +0200, Juri Lelli wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 20/06/25 11:00, Kuyo Chang wrote:
>
> ...
>
> >
>
> Thanks for the additional explanation.
>
> The way I understand it now is the following (of course please
> correct
> me if I am still not getting it :)
>
> - a dl_server is actively servicing NORMAL tasks, but suffers lot of
> IRQ
> load and cannot make much progress
> - it does anyway make progress, but it reaches
> update_curr_dl_se@throttle
> only when its current deadline is past rq_clock
> - dl_runtime_exceeded() branch is entered, but start_dl_timer() fails
> as
> the computed act is still in the past
> - enqueue_dl_entity(REPLENISH) call replenish_dl_entity() which tries
> to
> add runtime and advance the deadline, but time moved on so far that
> deadline is still behind rq_clock() and so "DL replenish ..." is
> printed
> - replenish_dl_new_period() updates runtime and deadline from current
> clock and the dl-server is put back to run (so it continues to run
> over/starve FIFO tasks)
>
Yes, "DL replenish ..." is the critical clue for identifying the root
cause of this issue.
> It looks like your proposed fix might work in this particular corner
> case, but I am not 100% comfortable with not trying to replenish
> properly (catch up with runtime) at all. I wonder if we might then
> start
> missing some other corner case. Maybe we could try to catch this
> particular corner case before even attempting to start the dl_timer,
> since we know it will fail, and do something at that point?
>
You can consider the patch more as an error-proofing mechanism, and so
far, it has been working well on our platform.
However, it might be better to catch this particular corner case in
advance to prevent the issue.
> Thanks,
> Juri
>
next prev parent reply other threads:[~2025-06-21 2:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-15 13:10 Kuyo Chang
2025-06-16 15:03 ` Juri Lelli
2025-06-18 14:20 ` Kuyo Chang
2025-06-19 13:13 ` Juri Lelli
2025-06-20 3:00 ` Kuyo Chang
2025-06-20 15:22 ` Juri Lelli
2025-06-21 2:55 ` Kuyo Chang [this message]
2025-07-23 22:22 ` Pierce Wen (溫彥翔)
2025-07-24 8:23 ` juri.lelli
2025-07-30 10:06 ` Geert Uytterhoeven
2025-07-31 15:00 ` Christian Loehle
2025-08-15 4:35 ` Jiri Slaby
2025-08-20 12:57 ` Diederik de Haas
2025-08-27 6:45 ` [tip: sched/urgent] " tip-bot2 for kuyo chang
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=a1103727ffaaf5f4d1b077bc09a3cc5168c5708d.camel@mediatek.com \
--to=kuyo.chang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®