From: Rik van Riel <riel@surriel.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>, peterz@infradead.org
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
kernel-team@fb.com, morten.rasmussen@arm.com, tglx@linutronix.de,
mgorman@techsingularity.com, vincent.guittot@linaro.org
Subject: Re: [PATCH 8/8] sched,fair: flatten hierarchical runqueues
Date: Fri, 28 Jun 2019 15:36:15 -0400 [thread overview]
Message-ID: <27e1ce40c50a1b575527531bfc8dd562843b8ad5.camel@surriel.com> (raw)
In-Reply-To: <1146bbfd-ae1e-27d8-6b62-d68392d8130f@arm.com>
[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]
On Fri, 2019-06-28 at 12:26 +0200, Dietmar Eggemann wrote:
> On 6/12/19 9:32 PM, Rik van Riel wrote:
> > Flatten the hierarchical runqueues into just the per CPU rq.cfs
> > runqueue.
> >
> > Iteration of the sched_entity hierarchy is rate limited to once per
> > jiffy
> > per sched_entity, which is a smaller change than it seems, because
> > load
> > average adjustments were already rate limited to once per jiffy
> > before this
> > patch series.
> >
> > This patch breaks CONFIG_CFS_BANDWIDTH. The plan for that is to
> > park tasks
> > from throttled cgroups onto their cgroup runqueues, and slowly
> > (using the
> > GENTLE_FAIR_SLEEPERS) wake them back up, in vruntime order, once
> > the cgroup
> > gets unthrottled, to prevent thundering herd issues.
> >
> > Signed-off-by: Rik van Riel <riel@surriel.com>
> > ---
> > include/linux/sched.h | 2 +
> > kernel/sched/fair.c | 478 +++++++++++++++++---------------------
> > ----
> > kernel/sched/pelt.c | 6 +-
> > kernel/sched/pelt.h | 2 +-
> > kernel/sched/sched.h | 2 +-
> > 5 files changed, 194 insertions(+), 296 deletions(-)
> >
>
> [...]
>
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>
> [...]
>
> > @@ -3491,7 +3544,7 @@ static inline bool update_load_avg(struct
> > cfs_rq *cfs_rq, struct sched_entity *s
> > * track group sched_entity load average for task_h_load calc
> > in migration
> > */
> > if (se->avg.last_update_time && !(flags & SKIP_AGE_LOAD))
> > - updated = __update_load_avg_se(now, cfs_rq, se);
> > + updated = __update_load_avg_se(now, cfs_rq, se, curr,
> > curr);
>
> I wonder if task migration is still working correctly.
>
> migrate_task_rq_fair(p, ...) -> remove_entity_load_avg(&p->se) would
> use
> cfs_rq = se->cfs_rq (i.e. root cfs_rq). So load (and util) will not
> propagate through the taskgroup hierarchy.
>
> [...]
Good point. This should be the group cfs_rq, and
then on the next tick the load change will be
propagated up.
Let me add that change in for v2 as well.
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-06-28 19:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 19:32 [RFC] sched,cfs: flatten CPU controller runqueues Rik van Riel
2019-06-12 19:32 ` [PATCH 1/8] sched: introduce task_se_h_load helper Rik van Riel
2019-06-19 12:52 ` Dietmar Eggemann
2019-06-19 13:57 ` Rik van Riel
2019-06-19 15:18 ` Dietmar Eggemann
2019-06-19 15:55 ` Rik van Riel
2019-06-12 19:32 ` [PATCH 2/8] sched: change /proc/sched_debug fields Rik van Riel
2019-06-12 19:32 ` [PATCH 3/8] sched,fair: redefine runnable_load_avg as the sum of task_h_load Rik van Riel
2019-06-18 9:08 ` Dietmar Eggemann
2019-06-26 14:34 ` Dietmar Eggemann
2019-06-12 19:32 ` [PATCH 4/8] sched,fair: remove cfs rqs from leaf_cfs_rq_list bottom up Rik van Riel
2019-06-12 19:32 ` [PATCH 5/8] sched,cfs: use explicit cfs_rq of parent se helper Rik van Riel
2019-06-20 16:23 ` Dietmar Eggemann
2019-06-20 16:29 ` Rik van Riel
2019-06-24 11:24 ` Dietmar Eggemann
2019-06-26 15:58 ` Dietmar Eggemann
2019-06-26 16:15 ` Rik van Riel
2019-06-12 19:32 ` [PATCH 6/8] sched,cfs: fix zero length timeslice calculation Rik van Riel
2019-06-12 19:32 ` [PATCH 7/8] sched,fair: refactor enqueue/dequeue_entity Rik van Riel
2019-06-12 19:32 ` [PATCH 8/8] sched,fair: flatten hierarchical runqueues Rik van Riel
2019-06-25 9:50 ` Dietmar Eggemann
2019-06-25 13:51 ` Rik van Riel
2019-06-28 10:26 ` Dietmar Eggemann
2019-06-28 19:36 ` Rik van Riel [this message]
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=27e1ce40c50a1b575527531bfc8dd562843b8ad5.camel@surriel.com \
--to=riel@surriel.com \
--cc=dietmar.eggemann@arm.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.com \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).