lkml.org 
[lkml]   [2011]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 06/19] sched: update source_load(), target_load() and weighted_cpuload() to use u64
Date
source_load(), target_load() and weighted_cpuload() refer to values in
rq->cpu_load, which is now u64. Update these functions to return u64 as well.

Signed-off-by: Nikhil Rao <ncrao@google.com>
---
kernel/sched.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index f2eb816..a49ef0e 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1473,7 +1473,7 @@ static int tg_nop(struct task_group *tg, void *data)

#ifdef CONFIG_SMP
/* Used instead of source_load when we know the type == 0 */
-static unsigned long weighted_cpuload(const int cpu)
+static u64 weighted_cpuload(const int cpu)
{
return cpu_rq(cpu)->load.weight;
}
@@ -1485,10 +1485,10 @@ static unsigned long weighted_cpuload(const int cpu)
* We want to under-estimate the load of migration sources, to
* balance conservatively.
*/
-static unsigned long source_load(int cpu, int type)
+static u64 source_load(int cpu, int type)
{
struct rq *rq = cpu_rq(cpu);
- unsigned long total = weighted_cpuload(cpu);
+ u64 total = weighted_cpuload(cpu);

if (type == 0 || !sched_feat(LB_BIAS))
return total;
@@ -1500,10 +1500,10 @@ static unsigned long source_load(int cpu, int type)
* Return a high guess at the load of a migration-target cpu weighted
* according to the scheduling class and "nice" value.
*/
-static unsigned long target_load(int cpu, int type)
+static u64 target_load(int cpu, int type)
{
struct rq *rq = cpu_rq(cpu);
- unsigned long total = weighted_cpuload(cpu);
+ u64 total = weighted_cpuload(cpu);

if (type == 0 || !sched_feat(LB_BIAS))
return total;
--
1.7.3.1


\
 
 \ /
  Last update: 2011-05-02 03:25    [from the cache]
©2003-2011 Jasper Spaans