Skip to content

Commit 5b680fd

Browse files
Shan HaiIngo Molnar
authored andcommitted
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>
1 parent 4d78a22 commit 5b680fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/sched/rt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
846846
if (rt_rq->rt_throttled)
847847
return rt_rq_throttled(rt_rq);
848848

849-
if (sched_rt_runtime(rt_rq) >= sched_rt_period(rt_rq))
849+
if (runtime >= sched_rt_period(rt_rq))
850850
return 0;
851851

852852
balance_runtime(rt_rq);

0 commit comments

Comments
 (0)