Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1422647

Re: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg()

From Yuyang Du <yuyang.du@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg()
Date 2016-06-15 08:20 +0200
Message-ID <rKclc-7in-35@gated-at.bofh.it> (permalink)
References <rI2pX-3aq-5@gated-at.bofh.it> <rI2pX-3aq-3@gated-at.bofh.it> <rJUxX-46H-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 14, 2016 at 12:11:52PM +0100, Matt Fleming wrote:
> 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>

Thanks, Matt.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg() Matt Fleming <matt@codeblueprint.co.uk> - 2016-06-14 13:20 +0200
  Re: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg() Peter Zijlstra <peterz@infradead.org> - 2016-06-14 14:20 +0200
  Re: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg() Yuyang Du <yuyang.du@intel.com> - 2016-06-15 08:20 +0200

csiph-web