aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2011-08-27 17:48:58 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2011-08-27 17:48:58 -0400
commit1c5cda5df118735a0e84fd3277d933f58ea814c8 (patch)
tree07a21bb5d91803651cd88667afe968db80bf2634 /include/litmus/rt_param.h
parent0e059210db4aef3ed1cff173652c23f257ccfa20 (diff)
Refactor the mixed-criticality (MC) plugin.
Add linux kernel configuration option CONFIG_LITMUS_MC. Attempt to restore rt_param.h to its original state as much as possible. Remove fields from rt_task and rt_job and move them into a new mc_data struct. Added mc_data field to rt_param compiled in only if using MC plugin. Make a new MC plugin specific header that contains a mc_data struct, which is a container for mc_task struct and a mc_job struct. Update sched_mc.c to use the new data structures. Also, add some macros that simplify the code, e.g., getting task criticality quickly. Add system call to set MC plugin specific stuff. Check for the change in liblitmus. Add a few lines to exit_litmus to reclaim the MC plugin mc_data struct in the task_struct on task exit.
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 3a456e7135d8..4ded23d658d0 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -27,14 +27,6 @@ typedef enum {
27 RT_CLASS_BEST_EFFORT 27 RT_CLASS_BEST_EFFORT
28} task_class_t; 28} task_class_t;
29 29
30/* criticality levels */
31typedef enum {
32 CRIT_LEVEL_A,
33 CRIT_LEVEL_B,
34 CRIT_LEVEL_C,
35 CRIT_LEVEL_D,
36} crit_level_t;
37
38typedef enum { 30typedef enum {
39 NO_ENFORCEMENT, /* job may overrun unhindered */ 31 NO_ENFORCEMENT, /* job may overrun unhindered */
40 QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */ 32 QUANTUM_ENFORCEMENT, /* budgets are only checked on quantum boundaries */
@@ -48,7 +40,6 @@ struct rt_task {
48 unsigned int cpu; 40 unsigned int cpu;
49 task_class_t cls; 41 task_class_t cls;
50 budget_policy_t budget_policy; /* ignored by pfair */ 42 budget_policy_t budget_policy; /* ignored by pfair */
51 crit_level_t crit;
52}; 43};
53 44
54/* The definition of the data that is shared between the kernel and real-time 45/* The definition of the data that is shared between the kernel and real-time
@@ -99,12 +90,12 @@ struct rt_job {
99 * Increase this sequence number when a job is released. 90 * Increase this sequence number when a job is released.
100 */ 91 */
101 unsigned int job_no; 92 unsigned int job_no;
102
103 lt_t ghost_budget;
104 int is_ghost;
105}; 93};
106 94
107struct pfair_param; 95struct pfair_param;
96#ifdef CONFIG_PLUGIN_MC
97struct mc_data;
98#endif
108 99
109/* RT task parameters for scheduling extensions 100/* RT task parameters for scheduling extensions
110 * These parameters are inherited during clone and therefore must 101 * These parameters are inherited during clone and therefore must
@@ -127,6 +118,11 @@ struct rt_param {
127 lt_t boost_start_time; 118 lt_t boost_start_time;
128#endif 119#endif
129 120
121#ifdef CONFIG_PLUGIN_MC
122 /* mixed criticality specific data */
123 struct mc_data *mc_data;
124#endif
125
130 /* user controlled parameters */ 126 /* user controlled parameters */
131 struct rt_task task_params; 127 struct rt_task task_params;
132 128