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


Groups > linux.kernel > #1421774 > unrolled thread

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

Started byMatt Fleming <matt@codeblueprint.co.uk>
First post2016-06-14 13:20 +0200
Last post2016-06-15 08:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

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

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-06-14 13:20 +0200
SubjectRe: [PATCH v5 1/5] sched/fair: Clean up attach_entity_load_avg()
Message-ID<rJUxX-46H-3@gated-at.bofh.it>
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>

[toc] | [next] | [standalone]


#1421854

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-14 14:20 +0200
Message-ID<rJVu2-4HM-17@gated-at.bofh.it>
In reply to#1421774
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>

So I still wonder at the point of this patch, since the next patch
deletes this code entirely. What's the point of cleaning it up if the
next patch removes it out-right.

[toc] | [prev] | [next] | [standalone]


#1422647

FromYuyang Du <yuyang.du@intel.com>
Date2016-06-15 08:20 +0200
Message-ID<rKclc-7in-35@gated-at.bofh.it>
In reply to#1421774
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web