[LITMUS^RT] Budget enforcement - EDF-WM

Felipe Cerqueira felipeqcerqueira at gmail.com
Wed Aug 1 17:39:05 CEST 2012


Hi everybody,

I've been discussing with Andrea about budget enforcement timers. We
are trying to fix a bug in EDF-WM, which was introduced after the
addition of generic enforcement timers in budget.c.
I'm working with Litmus-rt 2010.2 (semi-partitioned plugins).

static void arm_enforcement_timer(struct enforcement_timer* et, struct
task_struct* t)
{
	lt_t when_to_fire;
...
	if (likely(!is_np(t))) {
		when_to_fire = litmus_clock() + budget_remaining(t);
...
	}
}

As you can see, the enforcement timers use budget_remaining(t), which
computes the remaining budget of the task using task_params.exec_time.
But in the EDF-WM plugin the budget needs to be changed in
execution-time to conform with the needs of each slice (subtask).
After the timers started to be set in budget.c, we lost the ability to
program the timers of each slice.

Since the current version of Litmus uses those enforcement timers, I'd
like to know what you think about making
budget_remaining()/budget_exhausted() overrideable by the sched
plugin.
The timers are set after each schedule(), so by letting these budget
functions be plugin-dependent, we could update the budget in execution
time.
Would it be useful for future algorithms? Or for porting the
semi-partitioned plugins to the current version?
What about the overheads after implementing the callbacks?

There are two other possible solutions for EDF-WM:
1) Keep BUDGET_ENFORCEMENT off, and implement all the timer functions
inside the plugin (like it used to be in the past, so I'd get the code
from the previous patches).
2) Keep BUDGET_ENFORCEMENT on, and change task_params.exec_time to
trick the scheduler.

Thanks,
Felipe




More information about the litmus-dev mailing list