[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F85FE07.2060605@gmail.com>
Date: Wed, 11 Apr 2012 23:56:23 +0200
From: Juri Lelli <juri.lelli@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
cfriesen@...tel.com, oleg@...hat.com, fweisbec@...il.com,
darren@...art.com, johan.eker@...csson.com, p.faure@...tech.ch,
linux-kernel@...r.kernel.org, claudio@...dence.eu.com,
michael@...rulasolutions.com, fchecconi@...il.com,
tommaso.cucinotta@...up.it, nicola.manica@...i.unitn.it,
luca.abeni@...tn.it, dhaval.giani@...il.com, hgu1972@...il.com,
paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
insop.song@...csson.com, liming.wang@...driver.com
Subject: Re: [PATCH 08/16] sched: add period support for -deadline tasks.
On 04/11/2012 10:32 PM, Steven Rostedt wrote:
> On Fri, 2012-04-06 at 09:14 +0200, Juri Lelli wrote:
>
>> @@ -293,7 +293,11 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
>> * assigned (function returns true if it can).
>> *
>> * For this to hold, we must check if:
>> - * runtime / (deadline - t)< dl_runtime / dl_deadline .
>> + * runtime / (deadline - t)< dl_runtime / dl_period .
>> + *
>> + * Notice that the bandwidth check is done against the period. For
>> + * task with deadline equal to period this is the same of using
>> + * dl_deadline instead of dl_period in the equation above.
>
> First, it seems that the function returns true if:
>
> dl_runtime / dl_period< runtime / (deadline - t)
>
Right, the comment is wrong! Just reverse the inequality as you did.
>
> I'm a little confused by this. We are comparing the ratio of runtime
> left and deadline left, to the ratio of total runtime to period.
>
> I'm actually confused by this premise anyway. What's the purpose of
> comparing the ratio? If runtime< (deadline - t) wouldn't it not be able
> to complete anyway? Or are we thinking that the runtime will be
> interrupted proportionally by other tasks?
>
We are actually applying one of the CBS rules. We want to be able to
"slow down" a deadline task if it is going to exceed its reserved
bandwidth. We are in fact checking here that the bandwidth this task
will consume from t to its deadline is no more than its reserved one.
>
>
>> */
>> static bool dl_entity_overflow(struct sched_dl_entity *dl_se, u64 t)
>> {
>> @@ -312,7 +316,7 @@ static bool dl_entity_overflow(struct sched_dl_entity *dl_se, u64 t)
>> * to the (absolute) deadline. Therefore, overflowing the u64
>> * type is very unlikely to occur in both cases.
>> */
>> - left = dl_se->dl_deadline * dl_se->runtime;
>> + left = dl_se->dl_period * dl_se->runtime;
>> right = (dl_se->deadline - t) * dl_se->dl_runtime;
>>
>> return dl_time_before(right, left);
>
>
Thanks,
- Juri
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists