[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180801224556.2d0b9342@vmware.local.home>
Date: Wed, 1 Aug 2018 22:45:56 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: Daniel Bristot de Oliveira <bristot@...hat.com>,
linux-kernel@...r.kernel.org, Juri Lelli <juri.lelli@...hat.com>,
Luca Abeni <luca.abeni@...tannapisa.it>,
Tommaso Cucinotta <tommaso.cucinotta@...tannapisa.it>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, stable@...r.kernel.org
Subject: Re: [PATCH V2] sched/deadline: Update rq_clock of later_rq when
pushing a task
On Mon, 16 Jul 2018 13:45:21 +0300
Kirill Tkhai <ktkhai@...tuozzo.com> wrote:
> > --- a/kernel/sched/deadline.c
> > +++ b/kernel/sched/deadline.c
> > @@ -2090,8 +2090,16 @@ static int push_dl_task(struct rq *rq)
> > sub_rq_bw(&next_task->dl, &rq->dl);
> > set_task_cpu(next_task, later_rq->cpu);
> > add_rq_bw(&next_task->dl, &later_rq->dl);
> > +
> > + /*
> > + * Update the later_rq clock here, because the clock is used
> > + * by the cpufreq_update_util() inside __add_running_bw().
> > + * Then, set ENQUEUE_NOCLOCK flag to avoid updating the rq_clock
> > + * again in the activate_task()->enqueue_task().
>
> Is the second sentence really needed? It seems everybody knows, what NOCLOCK
> flag does, and we does not have to paraphrase this in every place it's used :)
I would keep the mention, but change the comment:
/*
* Update the later_rq clock before calling add_running_bw()
* because the clock is used by cpufreq_update_util() that is
* inside __add_running_bw(). As the later_rq clock is already
* updated, we need to set ENQUEUE_NOCLOCK to prevent
* activate_task() from updating it again.
*/
Other than that...
Acked-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
-- Steve
>
> > + */
> > + update_rq_clock(later_rq);
> > add_running_bw(&next_task->dl, &later_rq->dl);
> > - activate_task(later_rq, next_task, 0);
> > + activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
> > ret = 1;
> >
> > resched_curr(later_rq);
Powered by blists - more mailing lists