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


Groups > linux.kernel > #1421962 > unrolled thread

Re: [PATCH v5 4/5] sched/fair: Skip detach sched avgs for new task when changing task groups

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-06-14 16:40 +0200
Last post2016-06-14 16:50 +0200
Articles 2 — 1 participant

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 4/5] sched/fair: Skip detach sched avgs for new task  when changing task groups Peter Zijlstra <peterz@infradead.org> - 2016-06-14 16:40 +0200
    Re: [PATCH v5 4/5] sched/fair: Skip detach sched avgs for new task  when changing task groups Peter Zijlstra <peterz@infradead.org> - 2016-06-14 16:50 +0200

#1421962 — Re: [PATCH v5 4/5] sched/fair: Skip detach sched avgs for new task when changing task groups

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-14 16:40 +0200
SubjectRe: [PATCH v5 4/5] sched/fair: Skip detach sched avgs for new task when changing task groups
Message-ID<rJXFw-62a-29@gated-at.bofh.it>
On Thu, Jun 09, 2016 at 07:15:53AM +0800, Yuyang Du wrote:
> Newly forked task has not been enqueued, so should not be removed from
> cfs_rq in task_move_group_fair(). To do so, we identify newly forked
> tasks by their sched_avg's last_update_time in detach_entity_load_avg().

>  static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  {
> +	/* Newly forked tasks are not attached yet. */
> +	if (!se->avg.last_update_time)
> +		return;

Urgh, so this results in two different heuristics to detect 'new' tasks
and gives two different meanings to !last_update_time.

How about you use the existing heuristic as per vruntime_normalized()
and do:

	if (!se->sum_exec_runtime)
		return;

[toc] | [next] | [standalone]


#1421978

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-14 16:50 +0200
Message-ID<rJXPd-66e-47@gated-at.bofh.it>
In reply to#1421962
On Tue, Jun 14, 2016 at 04:36:49PM +0200, Peter Zijlstra wrote:
> On Thu, Jun 09, 2016 at 07:15:53AM +0800, Yuyang Du wrote:
> > Newly forked task has not been enqueued, so should not be removed from
> > cfs_rq in task_move_group_fair(). To do so, we identify newly forked
> > tasks by their sched_avg's last_update_time in detach_entity_load_avg().
> 
> >  static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
> >  {
> > +	/* Newly forked tasks are not attached yet. */
> > +	if (!se->avg.last_update_time)
> > +		return;
> 
> Urgh, so this results in two different heuristics to detect 'new' tasks
> and gives two different meanings to !last_update_time.
> 
> How about you use the existing heuristic as per vruntime_normalized()
> and do:
> 
> 	if (!se->sum_exec_runtime)
> 		return;

Hurm,. I see we already have this confusion as per
remove_entity_load_avg(). Could we fix it there too?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web