diff options
-rw-r--r-- | kernel/sched_rt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 998ba54b4543..77340b04a538 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -438,9 +438,6 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) | |||
438 | { | 438 | { |
439 | u64 runtime = sched_rt_runtime(rt_rq); | 439 | u64 runtime = sched_rt_runtime(rt_rq); |
440 | 440 | ||
441 | if (runtime == RUNTIME_INF) | ||
442 | return 0; | ||
443 | |||
444 | if (rt_rq->rt_throttled) | 441 | if (rt_rq->rt_throttled) |
445 | return rt_rq_throttled(rt_rq); | 442 | return rt_rq_throttled(rt_rq); |
446 | 443 | ||
@@ -491,9 +488,11 @@ static void update_curr_rt(struct rq *rq) | |||
491 | rt_rq = rt_rq_of_se(rt_se); | 488 | rt_rq = rt_rq_of_se(rt_se); |
492 | 489 | ||
493 | spin_lock(&rt_rq->rt_runtime_lock); | 490 | spin_lock(&rt_rq->rt_runtime_lock); |
494 | rt_rq->rt_time += delta_exec; | 491 | if (sched_rt_runtime(rt_rq) != RUNTIME_INF) { |
495 | if (sched_rt_runtime_exceeded(rt_rq)) | 492 | rt_rq->rt_time += delta_exec; |
496 | resched_task(curr); | 493 | if (sched_rt_runtime_exceeded(rt_rq)) |
494 | resched_task(curr); | ||
495 | } | ||
497 | spin_unlock(&rt_rq->rt_runtime_lock); | 496 | spin_unlock(&rt_rq->rt_runtime_lock); |
498 | } | 497 | } |
499 | } | 498 | } |