Re: [PATCH RFC] sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks

From: Daniel Bristot de Oliveira
Date: Thu May 11 2017 - 13:08:33 EST


On 05/04/2017 04:26 PM, Peter Zijlstra wrote:
> On Thu, May 04, 2017 at 04:17:21PM +0200, Peter Zijlstra wrote:
>> We use two difference CBS rules:
>>
>> 1) the original CBS rule for implicit deadline tasks;
>> 2) the revised CBS rule for constrained deadline tasks.
>>> @@ -500,6 +550,14 @@ static void update_dl_entity(struct sched_dl_entity *dl_se,
>>>
>>> if (dl_time_before(dl_se->deadline, rq_clock(rq)) ||
>>> dl_entity_overflow(dl_se, pi_se, rq_clock(rq))) {
>>> +
>>> + if (unlikely(dl_is_constrained(dl_se) &&
>>> + !dl_time_before(dl_se->deadline, rq_clock(rq)) &&
>>> + !dl_se->dl_boosted)){
>>> + update_dl_revised_wakeup(dl_se, rq);
>>> + return;
>>> + }
>>> +
>>> dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline;
>>> dl_se->runtime = pi_se->dl_runtime;
>>> }
> That comment above does not match the code. We can still use the
> original CBS rule for constrained tasks.
>
> We only use the revised CBS rule when the constrained task hasn't missed
> its deadline yet.

Correct. I will improve the explanation.

Thank you very much for all comments :-)

-- Daniel