Re: [PATCH] sched/deadline: Add sched_dl documentation

From: Luca Abeni
Date: Mon Jan 27 2014 - 07:52:48 EST


On 01/27/2014 01:40 PM, Henrik Austad wrote:
[...]
Current runtime: time spent running _this_ period? or is _remaining_
runtime this period? I get the feeling it's the latter.

So, roughly, it is the ration

remaining_runtime / relative_time_to_deadline

which needs to be greater than the assigned CPU bandwidth, and if so, the
budget should be replensihed?

Shouldn't there be something about not refilling the budget before a new
period has started?
Uh... Maybe the description above can be improved :)
Do you think that using "remaining runtime" instead of "current runtime"
would help? If yes, I'll make this change.

Yes, in my vocabularly, "remaining" != "current" :), so changing to
'remaining runtime' would be nice.
Ok; I'll make this change.


Also, I see that some of your questions are answered by some items below...

Yes, but I left the comments to indicate that the order was a bit
confusing.

Do you think that changing the order of the items in the presentation would
improve the readability? If you suggest a better ordering, I'll try to
rewrite the algorithm's description according to it.

Could be, at least the ratio-caclulation was a bit confusing until I'd read
the entire section.

My preferred order (I've just cut'n'pased from the original email here)

+ - The state of the task is described by a "scheduling deadline", and
+ a "current runtime". These two parameters are initially set to 0;
BTW, maybe some of the confusion can be avoided by explaining what the
"remaining runtime" is here... Something like:
- The state of the task is described by a "scheduling deadline", and
a "current runtime" (representing the amount of execution time that
the task can use before the scheduling deadline). These two parameters
are initially set to 0;

Can something like this help? If yes, I'll update the document.


[...]
+ - When a SCHED_DEADLINE task wakes up (becomes ready for execution),
+ the scheduler checks if
+
+ current runtime runtime
+ ---------------------------------- > ----------------
+ scheduling deadline - current time period
+
+ then, if the scheduling deadline is smaller than the current time, or
+ this condition is verified, the scheduling deadline and the
+ current budget are re-initialised as
+
+ scheduling deadline = current time + deadline
+ current runtime = runtime
+
+ otherwise, the scheduling deadline and the current runtime are
+ left unchanged;
+

Emphasis on -my- preferred order. :)
Ok; let's see what other people think, and then we decide the items'
order.


Either way, I'm quite happy with this documentation-update, this is just
nitpick :)
Ok, good.


Thanks,
Luca

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/