Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity
From: Juri Lelli
Date: Fri Aug 05 2016 - 06:14:17 EST
On 22/07/16 10:58, Xunlei Pang wrote:
> On 2016/07/21 at 22:46, Juri Lelli wrote:
[...]
> > @@ -1734,9 +1724,11 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
> > if (task_on_rq_queued(p)) {
> > /*
> > * If p is not queued we will update its parameters at next
> > - * wakeup.
> > + * wakeup. If p is dl_boosted we already updated its params in
> > + * rt_mutex_setprio()->enqueue_task(..., ENQUEUE_REPLENISH).
> > */
> > - if (dl_time_before(p->dl.deadline, rq_clock(rq)))
> > + if (dl_time_before(p->dl.deadline, rq_clock(rq)) &&
> > + !p->dl.dl_boosted)
>
> Hi Juri,
>
> It looks good to me, only one question:
> For on_rq boosted to deadline, p->dl.deadline has been updated after rq_lock(rq) by
> rt_mutex_setprio()->enqueue_task(..., ENQUEUE_REPLENISH) and no rq clock update
> afterwards, so dl_time_before() will be false, seems p->dl.dl_boosted check is needless.
>
Right. I removed it and posted v5. Please have a look.
Best,
- Juri