diff options
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9affb3c9d3db..29963af782ae 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -111,7 +111,7 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) | |||
111 | { | 111 | { |
112 | struct rt_prio_array *array = &rq->rt.active; | 112 | struct rt_prio_array *array = &rq->rt.active; |
113 | 113 | ||
114 | list_add_tail(&p->run_list, array->queue + p->prio); | 114 | list_add_tail(&p->rt.run_list, array->queue + p->prio); |
115 | __set_bit(p->prio, array->bitmap); | 115 | __set_bit(p->prio, array->bitmap); |
116 | inc_cpu_load(rq, p->se.load.weight); | 116 | inc_cpu_load(rq, p->se.load.weight); |
117 | 117 | ||
@@ -127,7 +127,7 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | |||
127 | 127 | ||
128 | update_curr_rt(rq); | 128 | update_curr_rt(rq); |
129 | 129 | ||
130 | list_del(&p->run_list); | 130 | list_del(&p->rt.run_list); |
131 | if (list_empty(array->queue + p->prio)) | 131 | if (list_empty(array->queue + p->prio)) |
132 | __clear_bit(p->prio, array->bitmap); | 132 | __clear_bit(p->prio, array->bitmap); |
133 | dec_cpu_load(rq, p->se.load.weight); | 133 | dec_cpu_load(rq, p->se.load.weight); |
@@ -143,7 +143,7 @@ static void requeue_task_rt(struct rq *rq, struct task_struct *p) | |||
143 | { | 143 | { |
144 | struct rt_prio_array *array = &rq->rt.active; | 144 | struct rt_prio_array *array = &rq->rt.active; |
145 | 145 | ||
146 | list_move_tail(&p->run_list, array->queue + p->prio); | 146 | list_move_tail(&p->rt.run_list, array->queue + p->prio); |
147 | } | 147 | } |
148 | 148 | ||
149 | static void | 149 | static void |
@@ -212,7 +212,7 @@ static struct task_struct *pick_next_task_rt(struct rq *rq) | |||
212 | return NULL; | 212 | return NULL; |
213 | 213 | ||
214 | queue = array->queue + idx; | 214 | queue = array->queue + idx; |
215 | next = list_entry(queue->next, struct task_struct, run_list); | 215 | next = list_entry(queue->next, struct task_struct, rt.run_list); |
216 | 216 | ||
217 | next->se.exec_start = rq->clock; | 217 | next->se.exec_start = rq->clock; |
218 | 218 | ||
@@ -261,14 +261,14 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu) | |||
261 | queue = array->queue + idx; | 261 | queue = array->queue + idx; |
262 | BUG_ON(list_empty(queue)); | 262 | BUG_ON(list_empty(queue)); |
263 | 263 | ||
264 | next = list_entry(queue->next, struct task_struct, run_list); | 264 | next = list_entry(queue->next, struct task_struct, rt.run_list); |
265 | if (unlikely(pick_rt_task(rq, next, cpu))) | 265 | if (unlikely(pick_rt_task(rq, next, cpu))) |
266 | goto out; | 266 | goto out; |
267 | 267 | ||
268 | if (queue->next->next != queue) { | 268 | if (queue->next->next != queue) { |
269 | /* same prio task */ | 269 | /* same prio task */ |
270 | next = list_entry(queue->next->next, struct task_struct, | 270 | next = list_entry(queue->next->next, struct task_struct, |
271 | run_list); | 271 | rt.run_list); |
272 | if (pick_rt_task(rq, next, cpu)) | 272 | if (pick_rt_task(rq, next, cpu)) |
273 | goto out; | 273 | goto out; |
274 | } | 274 | } |
@@ -282,7 +282,7 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu) | |||
282 | queue = array->queue + idx; | 282 | queue = array->queue + idx; |
283 | BUG_ON(list_empty(queue)); | 283 | BUG_ON(list_empty(queue)); |
284 | 284 | ||
285 | list_for_each_entry(next, queue, run_list) { | 285 | list_for_each_entry(next, queue, rt.run_list) { |
286 | if (pick_rt_task(rq, next, cpu)) | 286 | if (pick_rt_task(rq, next, cpu)) |
287 | goto out; | 287 | goto out; |
288 | } | 288 | } |
@@ -846,16 +846,16 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p) | |||
846 | if (p->policy != SCHED_RR) | 846 | if (p->policy != SCHED_RR) |
847 | return; | 847 | return; |
848 | 848 | ||
849 | if (--p->time_slice) | 849 | if (--p->rt.time_slice) |
850 | return; | 850 | return; |
851 | 851 | ||
852 | p->time_slice = DEF_TIMESLICE; | 852 | p->rt.time_slice = DEF_TIMESLICE; |
853 | 853 | ||
854 | /* | 854 | /* |
855 | * Requeue to the end of queue if we are not the only element | 855 | * Requeue to the end of queue if we are not the only element |
856 | * on the queue: | 856 | * on the queue: |
857 | */ | 857 | */ |
858 | if (p->run_list.prev != p->run_list.next) { | 858 | if (p->rt.run_list.prev != p->rt.run_list.next) { |
859 | requeue_task_rt(rq, p); | 859 | requeue_task_rt(rq, p); |
860 | set_tsk_need_resched(p); | 860 | set_tsk_need_resched(p); |
861 | } | 861 | } |