aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/litmus.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2013-03-17 17:23:36 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2013-03-17 17:23:36 -0400
commit469aaad39c956446b8a31d351ee36bedd87ac18a (patch)
tree3e2864a01df8a04ab7a406342627d3dc850760af /include/litmus/litmus.h
parent9374a7c30b6906d01c548833fb8a7b65ba4b5ccc (diff)
Per-task budget high-resolution timers (hrtimers).
As a step towards implementing more complex budget tracking method (ex. BWI, VXR, etc.), we need per-task budget trackers because we may be required to drain budget from a task, even while it is suspended or blocked. This patch does: 1) Replaces the per-CPU hrtimers with per-task hrtimers. 2) Plugin architecture for different budget policies. This patch creates three budget draining policies: SIMPLE, SAWARE (suspension-aware), and SOBLIV (suspension-oblivious). However, only SIMPLE is supported by this patch. SIMPLE (default): Budget drains while the task is scheduled. Budget is preserved across self-suspensions (but not job completions, of course). Only SIMPLE is supported in this patch. (Maintaining current Litmus functionality.) SAWARE: Draining according to suspension-aware analysis. Budget should drain whenever a task is among the top-m tasks in its cluster, where m is the number of processors in said cluster. This draining should happen whether or not the task is actually scheduled. SOBLIV: Draining according to suspension-oblivious analysis. Budget should drain whenever the task is scheduled or suspended (but not due to preemption). Exception: Draining should halt when we can prove that the task is not among the top-m tasks blocked on the same lock (i.e., on the PQ in the OMLP-family locking protocols).
Diffstat (limited to 'include/litmus/litmus.h')
-rw-r--r--include/litmus/litmus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 70b421d59d34..f6ea5f6e80ee 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -62,6 +62,7 @@ void litmus_exit_task(struct task_struct *tsk);
62#define get_priority(t) (tsk_rt(t)->task_params.priority) 62#define get_priority(t) (tsk_rt(t)->task_params.priority)
63#define get_class(t) (tsk_rt(t)->task_params.cls) 63#define get_class(t) (tsk_rt(t)->task_params.cls)
64#define get_release_policy(t) (tsk_rt(t)->task_params.release_policy) 64#define get_release_policy(t) (tsk_rt(t)->task_params.release_policy)
65#define get_drain_policy(t) (tsk_rt(t)->task_params.drain_policy)
65 66
66/* job_param macros */ 67/* job_param macros */
67#define get_exec_time(t) (tsk_rt(t)->job_params.exec_time) 68#define get_exec_time(t) (tsk_rt(t)->job_params.exec_time)
@@ -69,6 +70,7 @@ void litmus_exit_task(struct task_struct *tsk);
69#define get_period(t) (tsk_rt(t)->task_params.period) 70#define get_period(t) (tsk_rt(t)->task_params.period)
70#define get_release(t) (tsk_rt(t)->job_params.release) 71#define get_release(t) (tsk_rt(t)->job_params.release)
71#define get_lateness(t) (tsk_rt(t)->job_params.lateness) 72#define get_lateness(t) (tsk_rt(t)->job_params.lateness)
73#define get_budget_timer(t) (tsk_rt(t)->job_params.budget_timer)
72 74
73#define effective_priority(t) ((!(tsk_rt(t)->inh_task)) ? t : tsk_rt(t)->inh_task) 75#define effective_priority(t) ((!(tsk_rt(t)->inh_task)) ? t : tsk_rt(t)->inh_task)
74#define base_priority(t) (t) 76#define base_priority(t) (t)