summaryrefslogtreecommitdiffstats
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorJuri Lelli <juri.lelli@arm.com>2015-09-02 06:01:36 -0400
committerIngo Molnar <mingo@kernel.org>2015-09-23 03:51:26 -0400
commit269b26a5ef2b10bf15f66524fa47d81c1b4dc1a1 (patch)
tree35b4e4004c3eb45cd18cf1ddf4d96d0eed92d1fb /kernel/sched/rt.c
parentf52405757e4e9bddd868d6b8ca501d58f292969f (diff)
sched/rt: Make (do_)balance_runtime() return void
The return value of (do_)balance_runtime() is not consumed by anybody. Make them return void. Signed-off-by: Juri Lelli <juri.lelli@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1441188096-23021-5-git-send-email-juri.lelli@arm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index d2ea59364a1c..e3cc16312046 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -635,11 +635,11 @@ bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
635/* 635/*
636 * We ran out of runtime, see if we can borrow some from our neighbours. 636 * We ran out of runtime, see if we can borrow some from our neighbours.
637 */ 637 */
638static int do_balance_runtime(struct rt_rq *rt_rq) 638static void do_balance_runtime(struct rt_rq *rt_rq)
639{ 639{
640 struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq); 640 struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
641 struct root_domain *rd = rq_of_rt_rq(rt_rq)->rd; 641 struct root_domain *rd = rq_of_rt_rq(rt_rq)->rd;
642 int i, weight, more = 0; 642 int i, weight;
643 u64 rt_period; 643 u64 rt_period;
644 644
645 weight = cpumask_weight(rd->span); 645 weight = cpumask_weight(rd->span);
@@ -673,7 +673,6 @@ static int do_balance_runtime(struct rt_rq *rt_rq)
673 diff = rt_period - rt_rq->rt_runtime; 673 diff = rt_period - rt_rq->rt_runtime;
674 iter->rt_runtime -= diff; 674 iter->rt_runtime -= diff;
675 rt_rq->rt_runtime += diff; 675 rt_rq->rt_runtime += diff;
676 more = 1;
677 if (rt_rq->rt_runtime == rt_period) { 676 if (rt_rq->rt_runtime == rt_period) {
678 raw_spin_unlock(&iter->rt_runtime_lock); 677 raw_spin_unlock(&iter->rt_runtime_lock);
679 break; 678 break;
@@ -683,8 +682,6 @@ next:
683 raw_spin_unlock(&iter->rt_runtime_lock); 682 raw_spin_unlock(&iter->rt_runtime_lock);
684 } 683 }
685 raw_spin_unlock(&rt_b->rt_runtime_lock); 684 raw_spin_unlock(&rt_b->rt_runtime_lock);
686
687 return more;
688} 685}
689 686
690/* 687/*
@@ -796,26 +793,19 @@ static void __enable_runtime(struct rq *rq)
796 } 793 }
797} 794}
798 795
799static int balance_runtime(struct rt_rq *rt_rq) 796static void balance_runtime(struct rt_rq *rt_rq)
800{ 797{
801 int more = 0;
802
803 if (!sched_feat(RT_RUNTIME_SHARE)) 798 if (!sched_feat(RT_RUNTIME_SHARE))
804 return more; 799 return;
805 800
806 if (rt_rq->rt_time > rt_rq->rt_runtime) { 801 if (rt_rq->rt_time > rt_rq->rt_runtime) {
807 raw_spin_unlock(&rt_rq->rt_runtime_lock); 802 raw_spin_unlock(&rt_rq->rt_runtime_lock);
808 more = do_balance_runtime(rt_rq); 803 do_balance_runtime(rt_rq);
809 raw_spin_lock(&rt_rq->rt_runtime_lock); 804 raw_spin_lock(&rt_rq->rt_runtime_lock);
810 } 805 }
811
812 return more;
813} 806}
814#else /* !CONFIG_SMP */ 807#else /* !CONFIG_SMP */
815static inline int balance_runtime(struct rt_rq *rt_rq) 808static inline void balance_runtime(struct rt_rq *rt_rq) {}
816{
817 return 0;
818}
819#endif /* CONFIG_SMP */ 809#endif /* CONFIG_SMP */
820 810
821static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) 811static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)