aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/budget.c
Commit message (Collapse)AuthorAge
* Implement proper remote preemption supportBjoern B. Brandenburg2010-11-11
| | | | | | | | | | | | To date, Litmus has just hooked into the smp_send_reschedule() IPI handler and marked tasks as having to reschedule to implement remote preemptions. This was never particularly clean, but so far we got away with it. However, changes in the underlying Linux, and peculartities of the ARM code (interrupts enabled before context switch) break this naive approach. This patch introduces new state-machine based remote preemption support. By examining the local state before calling set_tsk_need_resched(), we avoid confusing the underlying Linux scheduler. Further, this patch avoids sending unncessary IPIs.
* Split out TRACE() from litmus.h and cleanup some includesBjoern B. Brandenburg2010-11-11
| | | | | | | | | | The TRACE() functionality doesn't need all of litmus.h. Currently, it's impossible to use TRACE() in sched.h due to a circular dependency. This patch moves TRACE() and friends to litmus/sched_debug.h, which can be included in sched.h. While at it, also fix some minor include ugliness that was revealed by this change.
* Litmus core: add plugin-independent precise budget enforcement infrastructureBjoern B. Brandenburg2010-10-19
Simple logic: if a task requires precise enforcement, then program a hr-timer to fire when the task must be descheduled. When the timer fires, simply activate the scheduler. When we switch to a different task, either reprogram the timer or cancel it.