diff options
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r-- | include/litmus/rt_param.h | 70 |
1 files changed, 50 insertions, 20 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 47301c04d862..c8ee64569dbb 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -128,6 +128,10 @@ struct control_page { | |||
128 | #include <litmus/binheap.h> | 128 | #include <litmus/binheap.h> |
129 | #include <linux/semaphore.h> | 129 | #include <linux/semaphore.h> |
130 | 130 | ||
131 | #ifdef CONFIG_LITMUS_SOFTIRQD | ||
132 | #include <linux/interrupt.h> | ||
133 | #endif | ||
134 | |||
131 | struct _rt_domain; | 135 | struct _rt_domain; |
132 | struct bheap_node; | 136 | struct bheap_node; |
133 | struct release_heap; | 137 | struct release_heap; |
@@ -205,6 +209,38 @@ typedef struct avg_est{ | |||
205 | lt_t avg; | 209 | lt_t avg; |
206 | } avg_est_t; | 210 | } avg_est_t; |
207 | 211 | ||
212 | |||
213 | |||
214 | #ifdef CONFIG_LITMUS_SOFTIRQD | ||
215 | //struct tasklet_head | ||
216 | //{ | ||
217 | // struct tasklet_struct *head; | ||
218 | // struct tasklet_struct **tail; | ||
219 | //}; | ||
220 | |||
221 | struct klmirqd_info | ||
222 | { | ||
223 | struct task_struct* klmirqd; | ||
224 | struct task_struct* current_owner; | ||
225 | unsigned int terminating:1; | ||
226 | |||
227 | raw_spinlock_t lock; | ||
228 | |||
229 | u32 pending; | ||
230 | atomic_t num_hi_pending; | ||
231 | atomic_t num_low_pending; | ||
232 | atomic_t num_work_pending; | ||
233 | |||
234 | /* in order of priority */ | ||
235 | struct tasklet_head pending_tasklets_hi; | ||
236 | struct tasklet_head pending_tasklets; | ||
237 | struct list_head worklist; | ||
238 | |||
239 | struct list_head klmirqd_reg; | ||
240 | }; | ||
241 | #endif | ||
242 | |||
243 | |||
208 | /* RT task parameters for scheduling extensions | 244 | /* RT task parameters for scheduling extensions |
209 | * These parameters are inherited during clone and therefore must | 245 | * These parameters are inherited during clone and therefore must |
210 | * be explicitly set up before the task set is launched. | 246 | * be explicitly set up before the task set is launched. |
@@ -221,34 +257,21 @@ struct rt_param { | |||
221 | 257 | ||
222 | #ifdef CONFIG_LITMUS_SOFTIRQD | 258 | #ifdef CONFIG_LITMUS_SOFTIRQD |
223 | /* proxy threads have minimum priority by default */ | 259 | /* proxy threads have minimum priority by default */ |
224 | unsigned int is_proxy_thread:1; | 260 | unsigned int is_interrupt_thread:1; |
225 | |||
226 | /* pointer to klmirqd currently working on this | ||
227 | task_struct's behalf. only set by the task pointed | ||
228 | to by klmirqd. | ||
229 | 261 | ||
230 | ptr only valid if is_proxy_thread == 0 | 262 | /* pointer to data used by klmirqd thread. |
231 | */ | 263 | * |
232 | struct task_struct* cur_klmirqd; | 264 | * ptr only valid if is_interrupt_thread == 1 |
233 | |||
234 | /* Used to implement mutual execution exclusion between | ||
235 | * job and klmirqd execution. Job must always hold | ||
236 | * it's klmirqd_sem to execute. klmirqd instance | ||
237 | * must hold the semaphore before executing on behalf | ||
238 | * of a job. | ||
239 | */ | ||
240 | struct mutex klmirqd_sem; | ||
241 | |||
242 | /* status of held klmirqd_sem, even if the held klmirqd_sem is from | ||
243 | another task (only proxy threads do this though). | ||
244 | */ | 265 | */ |
245 | atomic_t klmirqd_sem_stat; | 266 | struct klmirqd_info* klmirqd_info; |
246 | #endif | 267 | #endif |
247 | 268 | ||
248 | #ifdef CONFIG_LITMUS_NVIDIA | 269 | #ifdef CONFIG_LITMUS_NVIDIA |
249 | /* number of top-half interrupts handled on behalf of current job */ | 270 | /* number of top-half interrupts handled on behalf of current job */ |
250 | atomic_t nv_int_count; | 271 | atomic_t nv_int_count; |
251 | long unsigned int held_gpus; // bitmap of held GPUs. | 272 | long unsigned int held_gpus; // bitmap of held GPUs. |
273 | struct binheap_node gpu_owner_node; // just one GPU for now... | ||
274 | unsigned int hide_from_gpu:1; | ||
252 | 275 | ||
253 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | 276 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING |
254 | avg_est_t gpu_migration_est[MIG_LAST+1]; | 277 | avg_est_t gpu_migration_est[MIG_LAST+1]; |
@@ -370,6 +393,13 @@ struct rt_param { | |||
370 | struct control_page * ctrl_page; | 393 | struct control_page * ctrl_page; |
371 | }; | 394 | }; |
372 | 395 | ||
396 | //#ifdef CONFIG_LITMUS_SOFTIRQD | ||
397 | //struct klmirqd_data | ||
398 | //{ | ||
399 | // struct binheap klmirqd_users; | ||
400 | //}; | ||
401 | //#endif | ||
402 | |||
373 | #ifdef CONFIG_REALTIME_AUX_TASKS | 403 | #ifdef CONFIG_REALTIME_AUX_TASKS |
374 | struct aux_data | 404 | struct aux_data |
375 | { | 405 | { |