Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1636491
| From | Vincent Guittot <vincent.guittot@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg |
| Date | 2017-05-05 19:00 +0200 |
| Message-ID | <tDOKd-4kV-11@gated-at.bofh.it> (permalink) |
| References | <tDvxT-8pV-5@gated-at.bofh.it> <tDvHA-8tt-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 4 May 2017 at 22:30, Tejun Heo <tj@kernel.org> wrote:
[snip]
> /* Take into account change of load of a child task group */
> static inline void
> update_tg_cfs_load(struct cfs_rq *cfs_rq, struct sched_entity *se)
> @@ -3120,17 +3144,6 @@ update_tg_cfs_load(struct cfs_rq *cfs_rq
> /* Update parent cfs_rq load */
> add_positive(&cfs_rq->avg.load_avg, delta);
> cfs_rq->avg.load_sum = cfs_rq->avg.load_avg * LOAD_AVG_MAX;
> -
> - /*
> - * If the sched_entity is already enqueued, we also have to update the
> - * runnable load avg.
> - */
> - if (se->on_rq) {
> - /* Update parent cfs_rq runnable_load_avg */
> - add_positive(&cfs_rq->avg.runnable_load_avg, delta);
> - cfs_rq->avg.runnable_load_sum =
> - cfs_rq->avg.runnable_load_avg * LOAD_AVG_MAX;
> - }
> }
>
> static inline void set_tg_cfs_propagate(struct cfs_rq *cfs_rq)
> @@ -3152,16 +3165,16 @@ static inline int test_and_clear_tg_cfs_
> /* Update task and its cfs_rq load average */
> static inline int propagate_entity_load_avg(struct sched_entity *se)
> {
> - struct cfs_rq *cfs_rq;
> + struct cfs_rq *cfs_rq = cfs_rq_of(se);
>
> if (entity_is_task(se))
> return 0;
>
> + update_tg_cfs_runnable(cfs_rq, se);
I wonder if update_tg_cfs_runnable() should really be called in
propagate_entity_load_avg().
propagate_entity_load_avg() is called on every update_load_avg because
of entity can be asynchronously detached so we must catch this
asynchronous events each time we update the load
But enqueue/dequeue of entity of fully synchronous and we know when
runnable_load_avg is updated and should be propagated. So instead of
calling update_tg_cfs_runnable() at every update_load_avg(), we can
only call it in the enque_/dequeue path and save lot of useless call
> +
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Tejun Heo <tj@kernel.org> - 2017-05-04 22:30 +0200
[PATCH 2/3] sched/fair: Add load_weight->runnable_load_{sum|avg} Tejun Heo <tj@kernel.org> - 2017-05-04 22:40 +0200
Re: [PATCH 2/3] sched/fair: Add load_weight->runnable_load_{sum|avg} Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-05-05 15:30 +0200
Re: [PATCH 2/3] sched/fair: Add load_weight->runnable_load_{sum|avg} Tejun Heo <tj@kernel.org> - 2017-05-05 15:30 +0200
Re: [PATCH 2/3] sched/fair: Add load_weight->runnable_load_{sum|avg} Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-05-05 15:50 +0200
[PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Tejun Heo <tj@kernel.org> - 2017-05-04 22:40 +0200
Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 12:50 +0200
Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 14:20 +0200
Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Tejun Heo <tj@kernel.org> - 2017-05-05 15:30 +0200
Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 19:00 +0200
[PATCH 1/3] sched/fair: Peter's shares_type patch Tejun Heo <tj@kernel.org> - 2017-05-04 22:40 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 12:50 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Tejun Heo <tj@kernel.org> - 2017-05-05 17:40 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Tejun Heo <tj@kernel.org> - 2017-05-10 17:20 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-10 18:10 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Peter Zijlstra <peterz@infradead.org> - 2017-05-11 09:00 +0200
Re: [PATCH 1/3] sched/fair: Peter's shares_type patch Peter Zijlstra <peterz@infradead.org> - 2017-05-05 17:50 +0200
Re: [RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 10:50 +0200
Re: [RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Tejun Heo <tj@kernel.org> - 2017-05-05 15:30 +0200
Re: [RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-05 15:40 +0200
csiph-web