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


Groups > linux.kernel > #1427716

Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks

From Yuyang Du <yuyang.du@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks
Date 2016-06-21 14:50 +0200
Message-ID <rMthU-5Vb-17@gated-at.bofh.it> (permalink)
References (5 earlier) <rL4EV-my-11@gated-at.bofh.it> <rM620-7K7-117@gated-at.bofh.it> <rM6EF-8f1-5@gated-at.bofh.it> <rM8Q9-16s-11@gated-at.bofh.it> <rMpxD-3qk-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 21, 2016 at 10:41:19AM +0200, Peter Zijlstra wrote:
> On Mon, Jun 20, 2016 at 03:49:34PM +0100, Dietmar Eggemann wrote:
> > On 20/06/16 13:35, Vincent Guittot wrote:
> 
> > > It will go through wake_up_new_task and post_init_entity_util_avg
> > > during its fork which is enough to set last_update_time. Then, it will
> > > use the switched_to_fair if the task becomes a fair one
> > 
> > Oh I see. We want to make sure that every task (even when forked as
> > !fair) has a last_update_time value != 0, when becoming fair one day.
> 
> Right, see 2 below. I need to write a bunch of comments explaining PELT
> proper, as well as document these things.
> 
> The things we ran into with these patches were that:
> 
>  1) You need to update the cfs_rq _before_ any entity attach/detach
>     (and might need to update_tg_load_avg when update_cfs_rq_load_avg()
>     returns true).

This is intrinsically an additional update, not a fix to anything. I
don't think it is a must, but I am fine with it.
 
>  2) (fair) entities are always attached, switched_from/to deal with !fair.
 
Yes, me too.

>  3) cpu migration is the only exception and uses the last_update_time=0
>     thing -- because refusal to take second rq->lock.

Task's last_update_time means this task is detached from fair queue. This
(re)definition is by all means much better than migrating. No?

> Which is why I dislike Yuyang's patches, they create more exceptions
> instead of applying existing rules (albeit undocumented).
> 
> Esp. 1 is important, because while for mathematically consistency you
> don't actually need to do this, you only need the entities to be
> up-to-date with the cfs rq when you attach/detach, but that forgets the
> temporal aspect of _when_ you do this.
 
Yes, temporally at any instant the avgs are outdated. But, I can have it,
and what if I have it?

I am thinking about document this really well, like "An art of load tracking:
accuracy, overhead, and usefulness", seriously.

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


Thread

[PATCH 0/4] sched/fair: Fix PELT wobblies Peter Zijlstra <peterz@infradead.org> - 2016-06-17 14:10 +0200
  [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-17 14:10 +0200
    Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-17 16:10 +0200
      Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-17 16:30 +0200
        Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-17 18:10 +0200
          Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-17 18:20 +0200
          Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-17 18:20 +0200
            Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Yuyang Du <yuyang.du@intel.com> - 2016-06-20 09:00 +0200
            Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-20 11:30 +0200
              Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-20 12:00 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-20 12:10 +0200
              Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-21 13:50 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-21 14:40 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-21 14:50 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-21 15:10 +0200
            Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-06-20 14:00 +0200
              Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-20 14:40 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-06-20 17:00 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-21 10:50 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Yuyang Du <yuyang.du@intel.com> - 2016-06-21 14:50 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-21 15:40 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-22 13:50 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-21 16:20 +0200
                Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-06-23 17:40 +0200
              Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-20 16:50 +0200
    Re: [PATCH 4/4] sched,fair: Fix PELT integrity for new tasks Peter Zijlstra <peterz@infradead.org> - 2016-06-23 13:20 +0200
  [PATCH 2/4] sched/fair: Fix PELT integrity for new groups Peter Zijlstra <peterz@infradead.org> - 2016-06-17 14:10 +0200
    Re: [PATCH 2/4] sched/fair: Fix PELT integrity for new groups Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-17 16:00 +0200
  [PATCH 3/4] sched,cgroup: Fix cpu_cgroup_fork() Peter Zijlstra <peterz@infradead.org> - 2016-06-17 14:10 +0200
    Re: [PATCH 3/4] sched,cgroup: Fix cpu_cgroup_fork() Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-17 16:00 +0200
      Re: [PATCH 3/4] sched,cgroup: Fix cpu_cgroup_fork() Peter Zijlstra <peterz@infradead.org> - 2016-06-17 16:10 +0200

csiph-web