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:03:52 +0200	[thread overview]
Message-ID: <20160531120352.GK3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtAhqXaJoC-nzBXnWqYaaqfughS1mi-qCyTWXkysjPaJ9w@mail.gmail.com>

On Tue, May 31, 2016 at 01:55:49PM +0200, Vincent Guittot wrote:
> Hi Yuyang,
> 
> On 31 May 2016 at 00:32, Yuyang Du <yuyang.du@intel.com> wrote:
> > Vincent reported that the first task to a new task group's cfs_rq will
> > be attached in attach_task_cfs_rq() and once more when it is enqueued
> > (see https://lkml.org/lkml/2016/5/25/388).
> >
> > Actually, it is worse, attach_task_cfs_rq() is invoked for new task even
> > way before the new task is initiated in init_entity_runnable_average().
> >
> > Solve this by avoiding attach as well as detach new task in
> > task_move_group_fair(). To do it, we need to know whether the task
> > is forked or not, so we pass this info all the way from sched_move_task()
> > to attach_task_cfs_rq().
> 
> I have tested your patch and I can't the spurious detach
> /attach_task_cfs_rq anymore
> so you can add my tested-by.
> 

Could someone update the Changelog to better explain the whole
callchain.

Because a quick look seems to suggest something like:

	copy_process()
	  sched_fork()
	  ...
	  cgroup_post_fork()
	    ss->fork() := cpu_cgroup_fork()

Which seems to suggest init_entity_runnable_average() is placed wrong
and should live in sched_fork() ?

Or am I not getting it.. ?

  reply	other threads:[~2016-05-31 12:04 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 [this message]
2016-05-31 12:33       ` Vincent Guittot
2016-05-31 12:39         ` Peter Zijlstra
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=20160531120352.GK3193@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