diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-09-10 13:30:24 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-09-10 13:30:24 -0400 |
commit | 893c8943ce5c5527f05ab7e9208d5a942d77d8b5 (patch) | |
tree | aa9e84b3503ff97c1d87bc9c2ce6682e51cfc971 /include/litmus/rt_param.h | |
parent | 901fdd9c22790039a76c1d3ee01828a2f124f6f3 (diff) | |
parent | d3c32e91e3fce2a57083a734efae6d9de06ec02f (diff) |
Merge branch 'prop/robust-tie-break' into wip-gpu-rtas12
Conflicts:
include/litmus/binheap.h
include/litmus/fdso.h
include/litmus/litmus.h
litmus/Makefile
litmus/binheap.c
litmus/edf_common.c
litmus/fdso.c
litmus/jobs.c
litmus/locking.c
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r-- | include/litmus/rt_param.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 04239c747f06..419ff0c88a65 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -26,7 +26,6 @@ static inline int lt_after_eq(lt_t a, lt_t b) | |||
26 | typedef enum { | 26 | typedef enum { |
27 | RT_CLASS_HARD, | 27 | RT_CLASS_HARD, |
28 | RT_CLASS_SOFT, | 28 | RT_CLASS_SOFT, |
29 | RT_CLASS_SOFT_W_SLIP, | ||
30 | RT_CLASS_BEST_EFFORT | 29 | RT_CLASS_BEST_EFFORT |
31 | } task_class_t; | 30 | } task_class_t; |
32 | 31 | ||
@@ -36,11 +35,33 @@ typedef enum { | |||
36 | PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ | 35 | PRECISE_ENFORCEMENT /* budgets are enforced with hrtimers */ |
37 | } budget_policy_t; | 36 | } budget_policy_t; |
38 | 37 | ||
38 | /* We use the common priority interpretation "lower index == higher priority", | ||
39 | * which is commonly used in fixed-priority schedulability analysis papers. | ||
40 | * So, a numerically lower priority value implies higher scheduling priority, | ||
41 | * with priority 1 being the highest priority. Priority 0 is reserved for | ||
42 | * priority boosting. LITMUS_MAX_PRIORITY denotes the maximum priority value | ||
43 | * range. | ||
44 | */ | ||
45 | |||
46 | #define LITMUS_MAX_PRIORITY 512 | ||
47 | #define LITMUS_HIGHEST_PRIORITY 1 | ||
48 | #define LITMUS_LOWEST_PRIORITY (LITMUS_MAX_PRIORITY - 1) | ||
49 | |||
50 | /* Provide generic comparison macros for userspace, | ||
51 | * in case that we change this later. */ | ||
52 | #define litmus_higher_fixed_prio(a, b) (a < b) | ||
53 | #define litmus_lower_fixed_prio(a, b) (a > b) | ||
54 | #define litmus_is_valid_fixed_prio(p) \ | ||
55 | ((p) >= LITMUS_HIGHEST_PRIORITY && \ | ||
56 | (p) <= LITMUS_LOWEST_PRIORITY) | ||
57 | |||
39 | struct rt_task { | 58 | struct rt_task { |
40 | lt_t exec_cost; | 59 | lt_t exec_cost; |
41 | lt_t period; | 60 | lt_t period; |
61 | lt_t relative_deadline; | ||
42 | lt_t phase; | 62 | lt_t phase; |
43 | unsigned int cpu; | 63 | unsigned int cpu; |
64 | unsigned int priority; | ||
44 | task_class_t cls; | 65 | task_class_t cls; |
45 | budget_policy_t budget_policy; /* ignored by pfair */ | 66 | budget_policy_t budget_policy; /* ignored by pfair */ |
46 | }; | 67 | }; |
@@ -107,6 +128,12 @@ struct rt_job { | |||
107 | /* How much service has this job received so far? */ | 128 | /* How much service has this job received so far? */ |
108 | lt_t exec_time; | 129 | lt_t exec_time; |
109 | 130 | ||
131 | /* By how much did the prior job miss its deadline by? | ||
132 | * Value differs from tardiness in that lateness may | ||
133 | * be negative (when job finishes before its deadline). | ||
134 | */ | ||
135 | long long lateness; | ||
136 | |||
110 | /* Which job is this. This is used to let user space | 137 | /* Which job is this. This is used to let user space |
111 | * specify which job to wait for, which is important if jobs | 138 | * specify which job to wait for, which is important if jobs |
112 | * overrun. If we just call sys_sleep_next_period() then we | 139 | * overrun. If we just call sys_sleep_next_period() then we |
@@ -237,7 +264,7 @@ struct rt_param { | |||
237 | 264 | ||
238 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 265 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
239 | raw_spinlock_t hp_blocked_tasks_lock; | 266 | raw_spinlock_t hp_blocked_tasks_lock; |
240 | struct binheap_handle hp_blocked_tasks; | 267 | struct binheap hp_blocked_tasks; |
241 | 268 | ||
242 | /* pointer to lock upon which is currently blocked */ | 269 | /* pointer to lock upon which is currently blocked */ |
243 | struct litmus_lock* blocked_lock; | 270 | struct litmus_lock* blocked_lock; |