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


Groups > linux.kernel > #1410268

Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task
Date 2016-05-31 14:50 +0200
Message-ID <rERho-2Kk-9@gated-at.bofh.it> (permalink)
References <rELvj-7hB-3@gated-at.bofh.it> <rELvj-7hB-7@gated-at.bofh.it> <rEQv1-2eq-63@gated-at.bofh.it> <rEQEG-2x9-39@gated-at.bofh.it> <rER7H-2H1-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3] sched/fair: Skip attach and detach for new group task in task_move_group_fair() Yuyang Du <yuyang.du@intel.com> - 2016-05-31 08:40 +0200
  [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Yuyang Du <yuyang.du@intel.com> - 2016-05-31 08:40 +0200
    Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Vincent Guittot <vincent.guittot@linaro.org> - 2016-05-31 14:00 +0200
      Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Peter Zijlstra <peterz@infradead.org> - 2016-05-31 14:10 +0200
        Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Vincent Guittot <vincent.guittot@linaro.org> - 2016-05-31 14:40 +0200
          Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Peter Zijlstra <peterz@infradead.org> - 2016-05-31 14:50 +0200
            Re: [PATCH v2 2/3] sched/fair: Skip detach and attach new group task Vincent Guittot <vincent.guittot@linaro.org> - 2016-05-31 15:30 +0200
  [PATCH v2 3/3] sched/fair: Add inline to detach_entity_load_evg() Yuyang Du <yuyang.du@intel.com> - 2016-05-31 08:40 +0200

csiph-web