[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160531123958.GL3193@twins.programming.kicks-ass.net>
Date: Tue, 31 May 2016 14:39:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Yuyang Du <yuyang.du@...el.com>, Ingo Molnar <mingo@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Benjamin Segall <bsegall@...gle.com>,
Paul Turner <pjt@...gle.com>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>
Subject: Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task
On Tue, May 31, 2016 at 02:33:45PM +0200, Vincent Guittot wrote:
> The sched_avg of a task is not used anymore in copy_process with
> yuyang's patchset. To be fully correct, we still have a
> p->se.avg.last_update_time = 0 in cpu_cgroup_fork but this is just the
> side effect of factoring cpu_group_fork and cpu_group_move in
> sched_move_task and it will be overwritten by
> init_entity_runnable_average before being used.
Yeah, but why? Why does init_entity_runnable_average() live in
wake_up_new_task()? That doesn't seem to make sense.
Also note that vruntime_normalized() (ab)uses !se->sum_exec_runtime to
detect the new task state.
> Now, cpu_cgroup_fork() only sets task group and cfs_rq of the forked task
>
> copy_process
> sched_fork
> ...
> cgroup_post_fork
> ss->fork() := cpu_cgroup_fork() which only set task group and
> cfs_rq of the sched_entity of the task
>
> wake_up_new_task
> init_entity_runnable_average
> activate_task
> enqueue_task
> attach_task
Powered by blists - more mailing lists