Re: [BUG] Caused by: sched/deadline: Move CPU frequency selection triggering points

From: Steven Rostedt
Date: Tue Jul 03 2018 - 11:49:22 EST


On Tue, 3 Jul 2018 11:31:20 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Tue, 3 Jul 2018 17:07:11 +0200
> Juri Lelli <juri.lelli@xxxxxxxxxx> wrote:
>
> > This got into tip quite recently
> >
> > ecda2b66e263 ("sched/deadline: Fix missing clock update")
> >
> > could you please double check that you have that in your stack?
> >
>
> Unfortunately, I just tested it out, and it still locks up with this
> patch.
>

It appears that the below patch fixes the issue for me.

Is this a correct usage?

-- Steve

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index fbfc3f1d368a..90b6e9df79b2 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2085,6 +2085,8 @@ static int push_dl_task(struct rq *rq)
goto retry;
}

+ update_rq_clock(later_rq);
+
deactivate_task(rq, next_task, 0);
sub_running_bw(&next_task->dl, &rq->dl);
sub_rq_bw(&next_task->dl, &rq->dl);