aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 8ff824565e06..201a69382a42 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -374,11 +374,15 @@ static void update_curr_rt(struct rq *rq)
374 curr->se.exec_start = rq->clock; 374 curr->se.exec_start = rq->clock;
375 cpuacct_charge(curr, delta_exec); 375 cpuacct_charge(curr, delta_exec);
376 376
377 spin_lock(&rt_rq->rt_runtime_lock); 377 for_each_sched_rt_entity(rt_se) {
378 rt_rq->rt_time += delta_exec; 378 rt_rq = rt_rq_of_se(rt_se);
379 if (sched_rt_runtime_exceeded(rt_rq)) 379
380 resched_task(curr); 380 spin_lock(&rt_rq->rt_runtime_lock);
381 spin_unlock(&rt_rq->rt_runtime_lock); 381 rt_rq->rt_time += delta_exec;
382 if (sched_rt_runtime_exceeded(rt_rq))
383 resched_task(curr);
384 spin_unlock(&rt_rq->rt_runtime_lock);
385 }
382} 386}
383 387
384static inline 388static inline
@@ -477,7 +481,6 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se)
477 * entries, we must remove entries top - down. 481 * entries, we must remove entries top - down.
478 * 482 *
479 * XXX: O(1/2 h^2) because we can only walk up, not down the chain. 483 * XXX: O(1/2 h^2) because we can only walk up, not down the chain.
480 * doesn't matter much for now, as h=2 for GROUP_SCHED.
481 */ 484 */
482static void dequeue_rt_stack(struct task_struct *p) 485static void dequeue_rt_stack(struct task_struct *p)
483{ 486{