diff options
author | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-04-24 14:12:24 -0400 |
---|---|---|
committer | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-04-24 14:12:24 -0400 |
commit | 9866b27f4820219f939d4d2e8bc2cdce5c6797e9 (patch) | |
tree | 1cb6da1312680b26339c17b13a7b2d8cda1bf939 /include | |
parent | 7bf3583ed15c745f295099a0d1ac4b087a2ddcf6 (diff) |
Fixed a number of issues, subtle and otherwise, with PI semaphores.
PI semaphores now use scheduler callbacks to update priority on a down or
up call. Issues with calling down/up and not calling __down_failed or
__up_wakeup for PI semaphores has been noted (since priority-related things
occured in those calls) and up has been fixed (down is in process).
Callbacks are now responsible for the priority checks and
updates, and some subtle cases are handled that were missed before. Still
need to finish handling GSN-EDF implementation issues related to suspensions.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rt_param.h | 17 | ||||
-rw-r--r-- | include/linux/sched_plugin.h | 7 |
2 files changed, 11 insertions, 13 deletions
diff --git a/include/linux/rt_param.h b/include/linux/rt_param.h index f2d6de639e..3dffaec9ce 100644 --- a/include/linux/rt_param.h +++ b/include/linux/rt_param.h | |||
@@ -61,15 +61,13 @@ typedef struct task_rt_param { | |||
61 | /* did the task just release a _PI_ semaphore? | 61 | /* did the task just release a _PI_ semaphore? |
62 | */ | 62 | */ |
63 | unsigned int released_pi_sem; | 63 | unsigned int released_pi_sem; |
64 | /* what is the current "inherited" task priority? | 64 | /* task representing the current "inherited" task |
65 | * this is a pointer to a pointer of a semaphore, | 65 | * priority, assigned by inherit_priority and |
66 | * indicating the task that has the highest | 66 | * return priority in the scheduler plugins. |
67 | * priority and thus indicates the priority of a | 67 | * could point to self if PI does not result in |
68 | * task holding a _PI_ semaphore. if this | 68 | * an increased task priority. |
69 | * pointer is zero, then don't use it, no _PI_ | ||
70 | * sem is being held. | ||
71 | */ | 69 | */ |
72 | struct task_struct **inh_task; | 70 | struct task_struct *inh_task; |
73 | 71 | ||
74 | unsigned int is_non_preemptable; | 72 | unsigned int is_non_preemptable; |
75 | 73 | ||
@@ -168,7 +166,8 @@ struct pi_semaphore { | |||
168 | atomic_t count; | 166 | atomic_t count; |
169 | int sleepers; | 167 | int sleepers; |
170 | wait_queue_head_t wait; | 168 | wait_queue_head_t wait; |
171 | struct task_struct *sem_hp_task; /* highest-prio task in queue */ | 169 | struct task_struct *hp_sem_task; /* highest-prio holder/waiter */ |
170 | struct task_struct *holder; /* current lock holder */ | ||
172 | int used; /* is the semaphore being used? */ | 171 | int used; /* is the semaphore being used? */ |
173 | }; | 172 | }; |
174 | 173 | ||
diff --git a/include/linux/sched_plugin.h b/include/linux/sched_plugin.h index ad6cee3b30..512abfd163 100644 --- a/include/linux/sched_plugin.h +++ b/include/linux/sched_plugin.h | |||
@@ -62,11 +62,10 @@ typedef long (*enter_np_t) (struct task_struct *); | |||
62 | typedef long (*exit_np_t) (struct task_struct *); | 62 | typedef long (*exit_np_t) (struct task_struct *); |
63 | 63 | ||
64 | 64 | ||
65 | typedef long (*inherit_priority_t) (struct task_struct *offspring, | 65 | typedef long (*inherit_priority_t) (struct pi_semaphore *sem, |
66 | struct task_struct *deceased); | 66 | struct task_struct *new_waiter); |
67 | 67 | ||
68 | typedef long (*return_priority_t) (struct task_struct *offspring, | 68 | typedef long (*return_priority_t) (struct pi_semaphore *sem); |
69 | struct task_struct *deceased); | ||
70 | 69 | ||
71 | 70 | ||
72 | 71 | ||