aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorShan Hai <haishan.bai@gmail.com>2011-11-28 22:03:56 -0500
committerIngo Molnar <mingo@elte.hu>2011-12-06 03:06:28 -0500
commit5b680fd61388abb9059fbc8e7a2f60f602bfce15 (patch)
tree9626e2d0f20d2eebcc415b5b29401890da7a6448 /kernel/sched/rt.c
parent4d78a2239e393f09e0964a2f8da394cc91d75155 (diff)
sched/rt: Code cleanup, remove a redundant function call
The second call to sched_rt_period() is redundant, because the value of the rt_runtime was already read and it was protected by the ->rt_runtime_lock. Signed-off-by: Shan Hai <haishan.bai@gmail.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1322535836-13590-2-git-send-email-haishan.bai@gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 58a48444e5c9..3640ebbb466b 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -846,7 +846,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
846 if (rt_rq->rt_throttled) 846 if (rt_rq->rt_throttled)
847 return rt_rq_throttled(rt_rq); 847 return rt_rq_throttled(rt_rq);
848 848
849 if (sched_rt_runtime(rt_rq) >= sched_rt_period(rt_rq)) 849 if (runtime >= sched_rt_period(rt_rq))
850 return 0; 850 return 0;
851 851
852 balance_runtime(rt_rq); 852 balance_runtime(rt_rq);