lkml.org 
[lkml]   [2016]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg()
On Thu, 09 Jun, at 07:15:50AM, Yuyang Du wrote:
> attach_entity_load_avg() is called (indirectly) from:
>
> - switched_to_fair(): switch between classes to fair
> - task_move_group_fair(): move between task groups
> - enqueue_entity_load_avg(): enqueue entity
>
> Only in switched_to_fair() is it possible that the task's last_update_time
> is not 0 and therefore the task needs sched avgs update, so move the task
> sched avgs update to switched_to_fair() only. In addition, the code is
> refactored and code comments are updated.
>
> No functionality change.
>
> Signed-off-by: Yuyang Du <yuyang.du@intel.com>
> ---
> kernel/sched/fair.c | 43 ++++++++++++++++++++-----------------------
> 1 file changed, 20 insertions(+), 23 deletions(-)

Looks OK to me and makes the code easier to understand. Chasing
->avg.last_update_time values is tricky at the best of times.

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>

\
 
 \ /
  Last update: 2016-06-14 13:41    [W:0.074 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site