public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Yuyang Du <yuyang.du@intel.com>, Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Benjamin Segall <bsegall@google.com>,
	Paul Turner <pjt@google.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>
Subject: Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task
Date: Tue, 31 May 2016 14:39:58 +0200	[thread overview]
Message-ID: <20160531123958.GL3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtB-_2yMwkW-nY5c+dBxVTL_zmd4QR=BL13hFr9mHX9B2A@mail.gmail.com>

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

  reply	other threads:[~2016-05-31 12:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 22:32 [PATCH v2 0/3] sched/fair: Skip attach and detach for new group task in task_move_group_fair() Yuyang Du
2016-05-30 22:32 ` [PATCH v2 1/3] sched/fair: Clean up attach_entity_load_avg() Yuyang Du
2016-05-31  8:34   ` Peter Zijlstra
2016-05-31  0:49     ` Yuyang Du
2016-05-31  9:14       ` Peter Zijlstra
2016-05-31 18:37     ` Yuyang Du
2016-05-30 22:32 ` [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Yuyang Du
2016-05-31 11:55   ` Vincent Guittot
2016-05-31 12:03     ` Peter Zijlstra
2016-05-31 12:33       ` Vincent Guittot
2016-05-31 12:39         ` Peter Zijlstra [this message]
2016-05-31 13:20           ` Vincent Guittot
2016-05-30 22:32 ` [PATCH v2 3/3] sched/fair: Add inline to detach_entity_load_evg() Yuyang Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160531123958.GL3193@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=pjt@google.com \
    --cc=vincent.guittot@linaro.org \
    --cc=yuyang.du@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox