diff options
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 1113157b2058..2e228bd5395e 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -389,7 +389,7 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) | |||
389 | int i, idle = 1; | 389 | int i, idle = 1; |
390 | cpumask_t span; | 390 | cpumask_t span; |
391 | 391 | ||
392 | if (rt_b->rt_runtime == RUNTIME_INF) | 392 | if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF) |
393 | return 1; | 393 | return 1; |
394 | 394 | ||
395 | span = sched_rt_period_mask(); | 395 | span = sched_rt_period_mask(); |
@@ -487,6 +487,9 @@ static void update_curr_rt(struct rq *rq) | |||
487 | curr->se.exec_start = rq->clock; | 487 | curr->se.exec_start = rq->clock; |
488 | cpuacct_charge(curr, delta_exec); | 488 | cpuacct_charge(curr, delta_exec); |
489 | 489 | ||
490 | if (!rt_bandwidth_enabled()) | ||
491 | return; | ||
492 | |||
490 | for_each_sched_rt_entity(rt_se) { | 493 | for_each_sched_rt_entity(rt_se) { |
491 | rt_rq = rt_rq_of_se(rt_se); | 494 | rt_rq = rt_rq_of_se(rt_se); |
492 | 495 | ||
@@ -784,7 +787,7 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p) | |||
784 | /* | 787 | /* |
785 | * Preempt the current task with a newly woken task if needed: | 788 | * Preempt the current task with a newly woken task if needed: |
786 | */ | 789 | */ |
787 | static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p) | 790 | static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int sync) |
788 | { | 791 | { |
789 | if (p->prio < rq->curr->prio) { | 792 | if (p->prio < rq->curr->prio) { |
790 | resched_task(rq->curr); | 793 | resched_task(rq->curr); |