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:07:10 EST


On 05/04/2017 04:23 PM, Peter Zijlstra wrote:
> On Thu, May 04, 2017 at 04:17:21PM +0200, Peter Zijlstra wrote:
>> On Mon, Apr 24, 2017 at 05:18:35PM +0200, Daniel Bristot de Oliveira wrote:
>>> +static void
>>> +update_dl_revised_wakeup(struct sched_dl_entity *dl_se, struct rq *rq)
>>> +{
>>> + u64 density = div64_u64(dl_se->dl_runtime << 20, dl_se->dl_deadline);
>>> + u64 laxity = dl_se->deadline - rq_clock(rq);
>>> +
>>> + BUG_ON(laxity < 0);
>> Compiler will make that go away, by virtue of laxity being unsigned.
> Also, so we want that to BUG (or even WARN) in a soft RT setting.
> Remember, GEDF does not guarantee we make our deadlines.

The point is that, a task with laxity < 0 should be throttled before
this point by:

df8eac8cafce ("sched/deadline: Throttle a constrained deadline task
activated after the deadline")

Arrive here with (laxity < 0) meas that we skipped that check.

>> We use two difference CBS rules:
> _different_, clearly I cannot type anymore either ;-)

ops... :-)

-- Daniel