lkml.org 
[lkml]   [2019]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/14] sched: introduce task_se_h_load helper
From
Date
On 7/22/19 7:33 PM, Rik van Riel wrote:
> Sometimes the hierarchical load of a sched_entity needs to be calculated.
> Rename task_h_load to task_se_h_load, and directly pass a sched_entity to
> that function.
>
> Move the function declaration up above where it will be used later.
>
> No functional changes.
>
> Signed-off-by: Rik van Riel <riel@surriel.com>
> Reviewed-by: Josef Bacik <josef@toxicpanda.com>

[...]

> /* Give new sched_entity start runnable values to heavy its load in infant time */
> @@ -1668,7 +1668,7 @@ static void task_numa_compare(struct task_numa_env *env,
> /*
> * In the overloaded case, try and keep the load balanced.
> */
> - load = task_h_load(env->p) - task_h_load(cur);
> + load = task_se_h_load(env->p->se) - task_se_h_load(cur->se);

Shouldn't this be:

load = task_se_h_load(&env->p->se) - task_se_h_load(&cur->se);

> if (!load)
> goto assign;
>
> @@ -1706,7 +1706,7 @@ static void task_numa_find_cpu(struct task_numa_env *env,
> bool maymove = false;
> int cpu;
>
> - load = task_h_load(env->p);
> + load = task_se_h_load(env->p->se);

load = task_se_h_load(&env->p->se);

[...]

\
 
 \ /
  Last update: 2019-08-12 19:49    [W:0.173 / U:5.988 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site