lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 08/16] sched: add period support for -deadline tasks.
From
Date
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)


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?

-- Steve




> */
> 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);




\
 
 \ /
  Last update: 2012-04-11 22:35    [W:0.730 / U:12.672 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site