diff options
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/edf_common.h | 6 | ||||
-rw-r--r-- | include/litmus/nvidia_info.h | 10 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 1 | ||||
-rw-r--r-- | include/litmus/sched_plugin.h | 22 |
4 files changed, 31 insertions, 8 deletions
diff --git a/include/litmus/edf_common.h b/include/litmus/edf_common.h index 818f4094b53c..63dff7efe8fb 100644 --- a/include/litmus/edf_common.h +++ b/include/litmus/edf_common.h | |||
@@ -27,12 +27,6 @@ int edf_min_heap_order(struct binheap_node *a, struct binheap_node *b); | |||
27 | int edf_max_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); | 27 | int edf_max_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); |
28 | int edf_min_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); | 28 | int edf_min_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); |
29 | 29 | ||
30 | typedef enum | ||
31 | { | ||
32 | BASE, | ||
33 | EFFECTIVE | ||
34 | } comparison_mode_t; | ||
35 | |||
36 | int __edf_higher_prio(struct task_struct* first, comparison_mode_t first_mode, | 30 | int __edf_higher_prio(struct task_struct* first, comparison_mode_t first_mode, |
37 | struct task_struct* second, comparison_mode_t second_mode); | 31 | struct task_struct* second, comparison_mode_t second_mode); |
38 | 32 | ||
diff --git a/include/litmus/nvidia_info.h b/include/litmus/nvidia_info.h index 9e07a27fdee3..dd41c4c72b85 100644 --- a/include/litmus/nvidia_info.h +++ b/include/litmus/nvidia_info.h | |||
@@ -28,11 +28,17 @@ int init_nv_device_reg(void); | |||
28 | 28 | ||
29 | int reg_nv_device(int reg_device_id, int register_device); | 29 | int reg_nv_device(int reg_device_id, int register_device); |
30 | 30 | ||
31 | struct task_struct* get_nv_device_owner(u32 target_device_id); | 31 | struct task_struct* get_nv_max_device_owner(u32 target_device_id); |
32 | //int is_nv_device_owner(u32 target_device_id); | ||
32 | 33 | ||
33 | void lock_nv_registry(u32 reg_device_id, unsigned long* flags); | 34 | void lock_nv_registry(u32 reg_device_id, unsigned long* flags); |
34 | void unlock_nv_registry(u32 reg_device_id, unsigned long* flags); | 35 | void unlock_nv_registry(u32 reg_device_id, unsigned long* flags); |
35 | 36 | ||
36 | void increment_nv_int_count(u32 device); | 37 | #ifdef CONFIG_LITMUS_PAI_SOFTIRQD |
38 | void pai_check_priority_increase(struct task_struct *t, int reg_device_id); | ||
39 | void pai_check_priority_decrease(struct task_struct *t, int reg_device_id); | ||
40 | #endif | ||
41 | |||
42 | //void increment_nv_int_count(u32 device); | ||
37 | 43 | ||
38 | #endif | 44 | #endif |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index d0040bfd2d0c..b4eb8ee95687 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -154,6 +154,7 @@ struct rt_param { | |||
154 | #ifdef CONFIG_LITMUS_NVIDIA | 154 | #ifdef CONFIG_LITMUS_NVIDIA |
155 | /* number of top-half interrupts handled on behalf of current job */ | 155 | /* number of top-half interrupts handled on behalf of current job */ |
156 | atomic_t nv_int_count; | 156 | atomic_t nv_int_count; |
157 | long unsigned int held_gpus; // bitmap of held GPUs. | ||
157 | #endif | 158 | #endif |
158 | 159 | ||
159 | #ifdef CONFIG_LITMUS_LOCKING | 160 | #ifdef CONFIG_LITMUS_LOCKING |
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h index e31008fcdd59..8e65555d9b7f 100644 --- a/include/litmus/sched_plugin.h +++ b/include/litmus/sched_plugin.h | |||
@@ -74,10 +74,28 @@ typedef void (*decrease_prio_klitirqd_t)(struct task_struct* klitirqd, | |||
74 | 74 | ||
75 | 75 | ||
76 | typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet); | 76 | typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet); |
77 | typedef void (*change_prio_pai_tasklet_t)(struct task_struct *old_prio, | ||
78 | struct task_struct *new_prio); | ||
77 | typedef void (*run_tasklets_t)(struct task_struct* next); | 79 | typedef void (*run_tasklets_t)(struct task_struct* next); |
78 | 80 | ||
79 | typedef raw_spinlock_t* (*get_dgl_spinlock_t) (struct task_struct *t); | 81 | typedef raw_spinlock_t* (*get_dgl_spinlock_t) (struct task_struct *t); |
80 | 82 | ||
83 | |||
84 | typedef int (*higher_prio_t)(struct task_struct* a, struct task_struct* b); | ||
85 | |||
86 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | ||
87 | |||
88 | typedef enum | ||
89 | { | ||
90 | BASE, | ||
91 | EFFECTIVE | ||
92 | } comparison_mode_t; | ||
93 | |||
94 | typedef int (*__higher_prio_t)(struct task_struct* a, comparison_mode_t a_mod, | ||
95 | struct task_struct* b, comparison_mode_t b_mod); | ||
96 | #endif | ||
97 | |||
98 | |||
81 | /********************* sys call backends ********************/ | 99 | /********************* sys call backends ********************/ |
82 | /* This function causes the caller to sleep until the next release */ | 100 | /* This function causes the caller to sleep until the next release */ |
83 | typedef long (*complete_job_t) (void); | 101 | typedef long (*complete_job_t) (void); |
@@ -112,6 +130,8 @@ struct sched_plugin { | |||
112 | task_block_t task_block; | 130 | task_block_t task_block; |
113 | task_exit_t task_exit; | 131 | task_exit_t task_exit; |
114 | 132 | ||
133 | higher_prio_t compare; | ||
134 | |||
115 | #ifdef CONFIG_LITMUS_LOCKING | 135 | #ifdef CONFIG_LITMUS_LOCKING |
116 | /* locking protocols */ | 136 | /* locking protocols */ |
117 | allocate_lock_t allocate_lock; | 137 | allocate_lock_t allocate_lock; |
@@ -121,6 +141,7 @@ struct sched_plugin { | |||
121 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 141 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
122 | nested_increase_prio_t nested_increase_prio; | 142 | nested_increase_prio_t nested_increase_prio; |
123 | nested_decrease_prio_t nested_decrease_prio; | 143 | nested_decrease_prio_t nested_decrease_prio; |
144 | __higher_prio_t __compare; | ||
124 | #endif | 145 | #endif |
125 | #ifdef CONFIG_LITMUS_DGL_SUPPORT | 146 | #ifdef CONFIG_LITMUS_DGL_SUPPORT |
126 | get_dgl_spinlock_t get_dgl_spinlock; | 147 | get_dgl_spinlock_t get_dgl_spinlock; |
@@ -132,6 +153,7 @@ struct sched_plugin { | |||
132 | #endif | 153 | #endif |
133 | #ifdef CONFIG_LITMUS_PAI_SOFTIRQD | 154 | #ifdef CONFIG_LITMUS_PAI_SOFTIRQD |
134 | enqueue_pai_tasklet_t enqueue_pai_tasklet; | 155 | enqueue_pai_tasklet_t enqueue_pai_tasklet; |
156 | change_prio_pai_tasklet_t change_prio_pai_tasklet; | ||
135 | run_tasklets_t run_tasklets; | 157 | run_tasklets_t run_tasklets; |
136 | #endif | 158 | #endif |
137 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); | 159 | } __attribute__ ((__aligned__(SMP_CACHE_BYTES))); |