lkml.org 
[lkml]   [2014]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 06/11] sched: clean up source_load/target_load
Date
Don't need 'rq' variable now.

Signed-off-by: Alex Shi <alex.shi@linaro.org>
---
kernel/sched/fair.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a85a10b..2da0e3b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3954,13 +3954,7 @@ static unsigned long weighted_cpuload(const int cpu)
*/
static unsigned long source_load(int cpu)
{
- struct rq *rq = cpu_rq(cpu);
- unsigned long total = weighted_cpuload(cpu);
-
- if (!sched_feat(LB_BIAS))
- return total;
-
- return min(rq->cpu_load, total);
+ return weighted_cpuload(cpu);
}

/*
@@ -3969,7 +3963,6 @@ static unsigned long source_load(int cpu)
*/
static unsigned long target_load(int cpu, int imbalance_pct)
{
- struct rq *rq = cpu_rq(cpu);
unsigned long total = weighted_cpuload(cpu);

if (!sched_feat(LB_BIAS))
@@ -3978,9 +3971,7 @@ static unsigned long target_load(int cpu, int imbalance_pct)
/*
* Bias target load with imbalance_pct.
*/
- total = total * imbalance_pct / 100;
-
- return max(rq->cpu_load, total);
+ return total * imbalance_pct / 100;
}

static unsigned long power_of(int cpu)
--
1.8.1.2


\
 
 \ /
  Last update: 2014-02-17 03:41    [W:0.168 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site