aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/edf_common.h6
-rw-r--r--include/litmus/nvidia_info.h10
-rw-r--r--include/litmus/rt_param.h1
-rw-r--r--include/litmus/sched_plugin.h22
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);
27int edf_max_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); 27int edf_max_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b);
28int edf_min_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b); 28int edf_min_heap_base_priority_order(struct binheap_node *a, struct binheap_node *b);
29 29
30typedef enum
31{
32 BASE,
33 EFFECTIVE
34} comparison_mode_t;
35
36int __edf_higher_prio(struct task_struct* first, comparison_mode_t first_mode, 30int __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
29int reg_nv_device(int reg_device_id, int register_device); 29int reg_nv_device(int reg_device_id, int register_device);
30 30
31struct task_struct* get_nv_device_owner(u32 target_device_id); 31struct task_struct* get_nv_max_device_owner(u32 target_device_id);
32//int is_nv_device_owner(u32 target_device_id);
32 33
33void lock_nv_registry(u32 reg_device_id, unsigned long* flags); 34void lock_nv_registry(u32 reg_device_id, unsigned long* flags);
34void unlock_nv_registry(u32 reg_device_id, unsigned long* flags); 35void unlock_nv_registry(u32 reg_device_id, unsigned long* flags);
35 36
36void increment_nv_int_count(u32 device); 37#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
38void pai_check_priority_increase(struct task_struct *t, int reg_device_id);
39void 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
76typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet); 76typedef int (*enqueue_pai_tasklet_t)(struct tasklet_struct* tasklet);
77typedef void (*change_prio_pai_tasklet_t)(struct task_struct *old_prio,
78 struct task_struct *new_prio);
77typedef void (*run_tasklets_t)(struct task_struct* next); 79typedef void (*run_tasklets_t)(struct task_struct* next);
78 80
79typedef raw_spinlock_t* (*get_dgl_spinlock_t) (struct task_struct *t); 81typedef raw_spinlock_t* (*get_dgl_spinlock_t) (struct task_struct *t);
80 82
83
84typedef int (*higher_prio_t)(struct task_struct* a, struct task_struct* b);
85
86#ifdef CONFIG_LITMUS_NESTED_LOCKING
87
88typedef enum
89{
90 BASE,
91 EFFECTIVE
92} comparison_mode_t;
93
94typedef 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 */
83typedef long (*complete_job_t) (void); 101typedef 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)));