Re: [PATCH] sched/deadline: Always calculate end of period on sched_yield()

From: Steven Rostedt
Date: Tue Feb 23 2016 - 08:13:03 EST


On Tue, 23 Feb 2016 13:28:22 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Fri, Feb 12, 2016 at 06:10:20PM -0500, Steven Rostedt wrote:
> > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> > index cd64c979d0e1..1dd180cda574 100644
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -735,7 +735,7 @@ static void update_curr_dl(struct rq *rq)
> > * approach need further study.
> > */
> > delta_exec = rq_clock_task(rq) - curr->se.exec_start;
> > - if (unlikely((s64)delta_exec <= 0))
> > + if (unlikely((s64)delta_exec <= 0 && !dl_se->dl_yielded))
> > return;
> >
> > schedstat_set(curr->se.statistics.exec_max,
>
>
> Would something like this make sense instead?
>

I'll test it and see if it works.

-- Steve