diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-11-09 14:51:15 -0500 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-11-09 14:51:15 -0500 |
| commit | 17719085c3b04c58389d96d7e8140d18fa3caf3d (patch) | |
| tree | 9009a454f71d3e4b78e695207a4405a811ba4cbe /include | |
| parent | f183b4b1e0b795490cd41f5c5ab286f480acd239 (diff) | |
Rename IKGLP R2DGLP.gpusync/staging
The I-KGLP was a pre-publish name for the R^2DGLP locking protocol
developed by B. Ward et al. ("Replica-Request Priority Donation:
A Real-Time Progress Mechanism for Global Locking Protocols"
presented at RTCSA 2012). This patch renames ikglp-named identifiers
to r2dglp-named identifiers.
Diffstat (limited to 'include')
| -rw-r--r-- | include/litmus/fdso.h | 6 | ||||
| -rw-r--r-- | include/litmus/r2dglp_lock.h (renamed from include/litmus/ikglp_lock.h) | 124 | ||||
| -rw-r--r-- | include/litmus/rt_param.h | 10 |
3 files changed, 70 insertions, 70 deletions
diff --git a/include/litmus/fdso.h b/include/litmus/fdso.h index 8b73285e09f3..6d6473eb55bd 100644 --- a/include/litmus/fdso.h +++ b/include/litmus/fdso.h | |||
| @@ -27,11 +27,11 @@ typedef enum { | |||
| 27 | PCP_SEM = 5, | 27 | PCP_SEM = 5, |
| 28 | 28 | ||
| 29 | FIFO_MUTEX = 6, | 29 | FIFO_MUTEX = 6, |
| 30 | IKGLP_SEM = 7, | 30 | R2DGLP_SEM = 7, |
| 31 | KFMLP_SEM = 8, | 31 | KFMLP_SEM = 8, |
| 32 | 32 | ||
| 33 | IKGLP_SIMPLE_GPU_AFF_OBS = 9, | 33 | R2DGLP_SIMPLE_GPU_AFF_OBS = 9, |
| 34 | IKGLP_GPU_AFF_OBS = 10, | 34 | R2DGLP_GPU_AFF_OBS = 10, |
| 35 | KFMLP_SIMPLE_GPU_AFF_OBS = 11, | 35 | KFMLP_SIMPLE_GPU_AFF_OBS = 11, |
| 36 | KFMLP_GPU_AFF_OBS = 12, | 36 | KFMLP_GPU_AFF_OBS = 12, |
| 37 | 37 | ||
diff --git a/include/litmus/ikglp_lock.h b/include/litmus/r2dglp_lock.h index c85c8c280299..2773997b0ff1 100644 --- a/include/litmus/ikglp_lock.h +++ b/include/litmus/r2dglp_lock.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifndef LITMUS_IKGLP_H | 1 | #ifndef LITMUS_R2DGLP_H |
| 2 | #define LITMUS_IKGLP_H | 2 | #define LITMUS_R2DGLP_H |
| 3 | 3 | ||
| 4 | #include <litmus/litmus.h> | 4 | #include <litmus/litmus.h> |
| 5 | #include <litmus/binheap.h> | 5 | #include <litmus/binheap.h> |
| @@ -7,51 +7,51 @@ | |||
| 7 | 7 | ||
| 8 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | 8 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING |
| 9 | #include <litmus/kexclu_affinity.h> | 9 | #include <litmus/kexclu_affinity.h> |
| 10 | struct ikglp_affinity; | 10 | struct r2dglp_affinity; |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | typedef struct ikglp_heap_node | 13 | typedef struct r2dglp_heap_node |
| 14 | { | 14 | { |
| 15 | struct task_struct *task; | 15 | struct task_struct *task; |
| 16 | struct binheap_node node; | 16 | struct binheap_node node; |
| 17 | } ikglp_heap_node_t; | 17 | } r2dglp_heap_node_t; |
| 18 | 18 | ||
| 19 | struct fifo_queue; | 19 | struct fifo_queue; |
| 20 | struct ikglp_wait_state; | 20 | struct r2dglp_wait_state; |
| 21 | struct fifo_queue; | 21 | struct fifo_queue; |
| 22 | 22 | ||
| 23 | typedef struct ikglp_donee_heap_node | 23 | typedef struct r2dglp_donee_heap_node |
| 24 | { | 24 | { |
| 25 | struct task_struct *task; | 25 | struct task_struct *task; |
| 26 | struct fifo_queue *fq; | 26 | struct fifo_queue *fq; |
| 27 | 27 | ||
| 28 | /* cross-linked with ikglp_wait_state_t of donor */ | 28 | /* cross-linked with r2dglp_wait_state_t of donor */ |
| 29 | struct ikglp_wait_state *donor_info; | 29 | struct r2dglp_wait_state *donor_info; |
| 30 | 30 | ||
| 31 | struct binheap_node node; | 31 | struct binheap_node node; |
| 32 | } ikglp_donee_heap_node_t; | 32 | } r2dglp_donee_heap_node_t; |
| 33 | 33 | ||
| 34 | typedef enum ikglp_states | 34 | typedef enum r2dglp_states |
| 35 | { | 35 | { |
| 36 | IKGLP_INVL = 0, | 36 | R2DGLP_INVL = 0, |
| 37 | IKGLP_FQ, | 37 | R2DGLP_FQ, |
| 38 | IKGLP_PQ, | 38 | R2DGLP_PQ, |
| 39 | IKGLP_DONOR | 39 | R2DGLP_DONOR |
| 40 | } ikglp_states_t; | 40 | } r2dglp_states_t; |
| 41 | 41 | ||
| 42 | /* | 42 | /* |
| 43 | Maintains the state of a request as it goes through the IKGLP. | 43 | Maintains the state of a request as it goes through the R2DGLP. |
| 44 | There are three exclusive wait states: | 44 | There are three exclusive wait states: |
| 45 | (1) as a donor | 45 | (1) as a donor |
| 46 | (2) in the PQ | 46 | (2) in the PQ |
| 47 | (3) in the FQ | 47 | (3) in the FQ |
| 48 | */ | 48 | */ |
| 49 | typedef struct ikglp_wait_state { | 49 | typedef struct r2dglp_wait_state { |
| 50 | struct task_struct *task; /* pointer back to the requesting task */ | 50 | struct task_struct *task; /* pointer back to the requesting task */ |
| 51 | 51 | ||
| 52 | ikglp_states_t cur_q; | 52 | r2dglp_states_t cur_q; |
| 53 | /* data for x-highest-prio tasks */ | 53 | /* data for x-highest-prio tasks */ |
| 54 | ikglp_heap_node_t global_heap_node; | 54 | r2dglp_heap_node_t global_heap_node; |
| 55 | 55 | ||
| 56 | /* TODO: put these fields in an appropriate union since wait | 56 | /* TODO: put these fields in an appropriate union since wait |
| 57 | states are exclusive. */ | 57 | states are exclusive. */ |
| @@ -59,17 +59,17 @@ typedef struct ikglp_wait_state { | |||
| 59 | /** Data for whilst in FIFO Queue **/ | 59 | /** Data for whilst in FIFO Queue **/ |
| 60 | wait_queue_t fq_node; | 60 | wait_queue_t fq_node; |
| 61 | struct fifo_queue *fq; | 61 | struct fifo_queue *fq; |
| 62 | ikglp_donee_heap_node_t donee_heap_node; | 62 | r2dglp_donee_heap_node_t donee_heap_node; |
| 63 | 63 | ||
| 64 | /** Data for whilst in PQ **/ | 64 | /** Data for whilst in PQ **/ |
| 65 | ikglp_heap_node_t pq_node; | 65 | r2dglp_heap_node_t pq_node; |
| 66 | 66 | ||
| 67 | /** Data for whilst a donor **/ | 67 | /** Data for whilst a donor **/ |
| 68 | /* cross-linked with donee's ikglp_donee_heap_node_t */ | 68 | /* cross-linked with donee's r2dglp_donee_heap_node_t */ |
| 69 | ikglp_donee_heap_node_t *donee_info; | 69 | r2dglp_donee_heap_node_t *donee_info; |
| 70 | struct nested_info prio_donation; | 70 | struct nested_info prio_donation; |
| 71 | struct binheap_node node; | 71 | struct binheap_node node; |
| 72 | } ikglp_wait_state_t; | 72 | } r2dglp_wait_state_t; |
| 73 | 73 | ||
| 74 | /* struct for FIFO mutex with priority inheritance */ | 74 | /* struct for FIFO mutex with priority inheritance */ |
| 75 | struct fifo_queue | 75 | struct fifo_queue |
| @@ -78,8 +78,8 @@ struct fifo_queue | |||
| 78 | struct task_struct* owner; | 78 | struct task_struct* owner; |
| 79 | 79 | ||
| 80 | /* used for bookkeepping */ | 80 | /* used for bookkeepping */ |
| 81 | ikglp_heap_node_t global_heap_node; | 81 | r2dglp_heap_node_t global_heap_node; |
| 82 | ikglp_donee_heap_node_t donee_heap_node; | 82 | r2dglp_donee_heap_node_t donee_heap_node; |
| 83 | 83 | ||
| 84 | struct task_struct* hp_waiter; | 84 | struct task_struct* hp_waiter; |
| 85 | unsigned int count; /* number of waiters + holder */ | 85 | unsigned int count; /* number of waiters + holder */ |
| @@ -96,8 +96,8 @@ struct fifo_queue | |||
| 96 | unsigned int is_vunlocked:1; | 96 | unsigned int is_vunlocked:1; |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | /* Main IKGLP data structure. */ | 99 | /* Main R2DGLP data structure. */ |
| 100 | struct ikglp_semaphore | 100 | struct r2dglp_semaphore |
| 101 | { | 101 | { |
| 102 | struct litmus_lock litmus_lock; | 102 | struct litmus_lock litmus_lock; |
| 103 | 103 | ||
| @@ -126,27 +126,27 @@ struct ikglp_semaphore | |||
| 126 | struct binheap donors; /* max-heap, ordered by base priority */ | 126 | struct binheap donors; /* max-heap, ordered by base priority */ |
| 127 | 127 | ||
| 128 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | 128 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING |
| 129 | struct ikglp_affinity *aff_obs; /* pointer to affinity observer */ | 129 | struct r2dglp_affinity *aff_obs; /* pointer to affinity observer */ |
| 130 | #endif | 130 | #endif |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | static inline struct ikglp_semaphore* ikglp_from_lock(struct litmus_lock* lock) | 133 | static inline struct r2dglp_semaphore* r2dglp_from_lock(struct litmus_lock* lock) |
| 134 | { | 134 | { |
| 135 | return container_of(lock, struct ikglp_semaphore, litmus_lock); | 135 | return container_of(lock, struct r2dglp_semaphore, litmus_lock); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | int ikglp_lock(struct litmus_lock* l); | 138 | int r2dglp_lock(struct litmus_lock* l); |
| 139 | int ikglp_unlock(struct litmus_lock* l); | 139 | int r2dglp_unlock(struct litmus_lock* l); |
| 140 | void ikglp_virtual_unlock(struct litmus_lock* l, struct task_struct* t); | 140 | void r2dglp_virtual_unlock(struct litmus_lock* l, struct task_struct* t); |
| 141 | void ikglp_budget_exhausted(struct litmus_lock* l, struct task_struct* t); | 141 | void r2dglp_budget_exhausted(struct litmus_lock* l, struct task_struct* t); |
| 142 | 142 | ||
| 143 | int ikglp_close(struct litmus_lock* l); | 143 | int r2dglp_close(struct litmus_lock* l); |
| 144 | void ikglp_free(struct litmus_lock* l); | 144 | void r2dglp_free(struct litmus_lock* l); |
| 145 | struct litmus_lock* ikglp_new(unsigned int m, struct litmus_lock_ops*, | 145 | struct litmus_lock* r2dglp_new(unsigned int m, struct litmus_lock_ops*, |
| 146 | void* __user arg); | 146 | void* __user arg); |
| 147 | 147 | ||
| 148 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | 148 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING |
| 149 | struct ikglp_queue_info | 149 | struct r2dglp_queue_info |
| 150 | { | 150 | { |
| 151 | struct fifo_queue* q; | 151 | struct fifo_queue* q; |
| 152 | lt_t estimated_len; | 152 | lt_t estimated_len; |
| @@ -154,33 +154,33 @@ struct ikglp_queue_info | |||
| 154 | unsigned int *nr_aff_users; | 154 | unsigned int *nr_aff_users; |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | /* routines for IKGLP to call to get advice on queueing operations */ | 157 | /* routines for R2DGLP to call to get advice on queueing operations */ |
| 158 | typedef struct fifo_queue* (*advise_enqueue_t)(struct ikglp_affinity* aff, | 158 | typedef struct fifo_queue* (*advise_enqueue_t)(struct r2dglp_affinity* aff, |
| 159 | struct task_struct* t); | 159 | struct task_struct* t); |
| 160 | typedef ikglp_wait_state_t* (*advise_steal_t)(struct ikglp_affinity* aff, | 160 | typedef r2dglp_wait_state_t* (*advise_steal_t)(struct r2dglp_affinity* aff, |
| 161 | struct fifo_queue* dst); | 161 | struct fifo_queue* dst); |
| 162 | typedef ikglp_donee_heap_node_t* (*advise_donee_t)(struct ikglp_affinity* aff, | 162 | typedef r2dglp_donee_heap_node_t* (*advise_donee_t)(struct r2dglp_affinity* aff, |
| 163 | struct task_struct* t); | 163 | struct task_struct* t); |
| 164 | typedef ikglp_wait_state_t* (*advise_donor_t)(struct ikglp_affinity* aff, | 164 | typedef r2dglp_wait_state_t* (*advise_donor_t)(struct r2dglp_affinity* aff, |
| 165 | struct fifo_queue* dst); | 165 | struct fifo_queue* dst); |
| 166 | 166 | ||
| 167 | /* routines for IKGLP to notify the affinity observer about changes in mutex state */ | 167 | /* routines for R2DGLP to notify the affinity observer about changes in mutex state */ |
| 168 | typedef void (*notify_enqueue_t)(struct ikglp_affinity* aff, | 168 | typedef void (*notify_enqueue_t)(struct r2dglp_affinity* aff, |
| 169 | struct fifo_queue* fq, struct task_struct* t); | 169 | struct fifo_queue* fq, struct task_struct* t); |
| 170 | typedef void (*notify_dequeue_t)(struct ikglp_affinity* aff, | 170 | typedef void (*notify_dequeue_t)(struct r2dglp_affinity* aff, |
| 171 | struct fifo_queue* fq, struct task_struct* t); | 171 | struct fifo_queue* fq, struct task_struct* t); |
| 172 | typedef void (*notify_acquire_t)(struct ikglp_affinity* aff, | 172 | typedef void (*notify_acquire_t)(struct r2dglp_affinity* aff, |
| 173 | struct fifo_queue* fq, struct task_struct* t); | 173 | struct fifo_queue* fq, struct task_struct* t); |
| 174 | typedef void (*notify_free_t)(struct ikglp_affinity* aff, | 174 | typedef void (*notify_free_t)(struct r2dglp_affinity* aff, |
| 175 | struct fifo_queue* fq, struct task_struct* t); | 175 | struct fifo_queue* fq, struct task_struct* t); |
| 176 | typedef int (*notify_exit_t)(struct ikglp_affinity* aff, | 176 | typedef int (*notify_exit_t)(struct r2dglp_affinity* aff, |
| 177 | struct task_struct* t); | 177 | struct task_struct* t); |
| 178 | 178 | ||
| 179 | /* convert a replica # to a GPU (includes offsets & simult user folding) */ | 179 | /* convert a replica # to a GPU (includes offsets & simult user folding) */ |
| 180 | typedef int (*replica_to_resource_t)(struct ikglp_affinity* aff, | 180 | typedef int (*replica_to_resource_t)(struct r2dglp_affinity* aff, |
| 181 | struct fifo_queue* fq); | 181 | struct fifo_queue* fq); |
| 182 | 182 | ||
| 183 | struct ikglp_affinity_ops | 183 | struct r2dglp_affinity_ops |
| 184 | { | 184 | { |
| 185 | advise_enqueue_t advise_enqueue; | 185 | advise_enqueue_t advise_enqueue; |
| 186 | advise_steal_t advise_steal; | 186 | advise_steal_t advise_steal; |
| @@ -196,11 +196,11 @@ struct ikglp_affinity_ops | |||
| 196 | replica_to_resource_t replica_to_resource; | 196 | replica_to_resource_t replica_to_resource; |
| 197 | }; | 197 | }; |
| 198 | 198 | ||
| 199 | struct ikglp_affinity | 199 | struct r2dglp_affinity |
| 200 | { | 200 | { |
| 201 | struct affinity_observer obs; | 201 | struct affinity_observer obs; |
| 202 | struct ikglp_affinity_ops *ops; | 202 | struct r2dglp_affinity_ops *ops; |
| 203 | struct ikglp_queue_info *q_info; | 203 | struct r2dglp_queue_info *q_info; |
| 204 | unsigned int *nr_cur_users_on_rsrc; | 204 | unsigned int *nr_cur_users_on_rsrc; |
| 205 | unsigned int *nr_aff_on_rsrc; | 205 | unsigned int *nr_aff_on_rsrc; |
| 206 | unsigned int offset; | 206 | unsigned int offset; |
| @@ -210,20 +210,20 @@ struct ikglp_affinity | |||
| 210 | unsigned int relax_max_fifo_len:1; | 210 | unsigned int relax_max_fifo_len:1; |
| 211 | }; | 211 | }; |
| 212 | 212 | ||
| 213 | static inline struct ikglp_affinity* ikglp_aff_obs_from_aff_obs( | 213 | static inline struct r2dglp_affinity* r2dglp_aff_obs_from_aff_obs( |
| 214 | struct affinity_observer* aff_obs) | 214 | struct affinity_observer* aff_obs) |
| 215 | { | 215 | { |
| 216 | return container_of(aff_obs, struct ikglp_affinity, obs); | 216 | return container_of(aff_obs, struct r2dglp_affinity, obs); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | int ikglp_aff_obs_close(struct affinity_observer*); | 219 | int r2dglp_aff_obs_close(struct affinity_observer*); |
| 220 | void ikglp_aff_obs_free(struct affinity_observer*); | 220 | void r2dglp_aff_obs_free(struct affinity_observer*); |
| 221 | 221 | ||
| 222 | #ifdef CONFIG_LITMUS_NVIDIA | 222 | #ifdef CONFIG_LITMUS_NVIDIA |
| 223 | struct affinity_observer* ikglp_gpu_aff_obs_new( | 223 | struct affinity_observer* r2dglp_gpu_aff_obs_new( |
| 224 | struct affinity_observer_ops* aff, | 224 | struct affinity_observer_ops* aff, |
| 225 | void* __user arg); | 225 | void* __user arg); |
| 226 | struct affinity_observer* ikglp_simple_gpu_aff_obs_new( | 226 | struct affinity_observer* r2dglp_simple_gpu_aff_obs_new( |
| 227 | struct affinity_observer_ops* aff, | 227 | struct affinity_observer_ops* aff, |
| 228 | void* __user arg); | 228 | void* __user arg); |
| 229 | #endif /* end LITMUS_NVIDIA */ | 229 | #endif /* end LITMUS_NVIDIA */ |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index f59b5b91ec09..6fa133afe4af 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
| @@ -135,12 +135,12 @@ struct gpu_affinity_observer_args | |||
| 135 | int relaxed_rules; | 135 | int relaxed_rules; |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | #define IKGLP_M_IN_FIFOS (0u) | 138 | #define R2DGLP_M_IN_FIFOS (0u) |
| 139 | #define IKGLP_UNLIMITED_IN_FIFOS (~0u) | 139 | #define R2DGLP_UNLIMITED_IN_FIFOS (~0u) |
| 140 | #define IKGLP_OPTIMAL_FIFO_LEN (0u) | 140 | #define R2DGLP_OPTIMAL_FIFO_LEN (0u) |
| 141 | #define IKGLP_UNLIMITED_FIFO_LEN (~0u) | 141 | #define R2DGLP_UNLIMITED_FIFO_LEN (~0u) |
| 142 | 142 | ||
| 143 | struct ikglp_args | 143 | struct r2dglp_args |
| 144 | { | 144 | { |
| 145 | unsigned int nr_replicas; | 145 | unsigned int nr_replicas; |
| 146 | unsigned int max_in_fifos; | 146 | unsigned int max_in_fifos; |
