Commit 5b680fd6 authored by Shan Hai's avatar Shan Hai Committed by Ingo Molnar

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: default avatarShan Hai <haishan.bai@gmail.com>
Reviewed-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1322535836-13590-2-git-send-email-haishan.bai@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4d78a223
...@@ -846,7 +846,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) ...@@ -846,7 +846,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
if (rt_rq->rt_throttled) if (rt_rq->rt_throttled)
return rt_rq_throttled(rt_rq); return rt_rq_throttled(rt_rq);
if (sched_rt_runtime(rt_rq) >= sched_rt_period(rt_rq)) if (runtime >= sched_rt_period(rt_rq))
return 0; return 0;
balance_runtime(rt_rq); balance_runtime(rt_rq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment