From: Rik van Riel <riel@surriel.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com,
dietmar.eggemann@arm.com, peterz@infradead.org, mingo@redhat.com,
morten.rasmussen@arm.com, tglx@linutronix.de,
mgorman@techsingularity.net, vincent.guittot@linaro.org
Subject: Re: [PATCH 09/10] sched,fair: add helper functions for flattened runqueue
Date: Mon, 01 Jul 2019 16:53:37 -0400 [thread overview]
Message-ID: <402b70ecb4d362ab6975b00a715872d585a18e35.camel@surriel.com> (raw)
In-Reply-To: <20190701202030.6sm7mdztyt6t5mui@macbook-pro-91.dhcp.thefacebook.com>
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
On Mon, 2019-07-01 at 16:20 -0400, Josef Bacik wrote:
>
>
> > +static unsigned long task_se_h_weight(struct sched_entity *se)
> > +{
> > + struct cfs_rq *cfs_rq;
> > +
> > + if (!task_se_in_cgroup(se))
> > + return se->load.weight;
> > +
> > + cfs_rq = group_cfs_rq_of_parent(se);
> > + update_cfs_rq_h_load(cfs_rq);
> > +
> > + /* Reduce the load.weight by the h_load of the group the task
> > is in. */
> > + return (cfs_rq->h_load * se->load.weight) >>
> > SCHED_FIXEDPOINT_SHIFT;
>
> This should be
>
> scale_load_down(cfs_rq->h_load * se->load.weight);
That may be the same mathematically, but it is
different conceptually.
If we convert CFS to have full load resolution with
cgroups (which we probably want), then scale_load_down
becomes a noop, while this shift continues doing the
right thing.
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-01 20:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 20:49 [PATCH RFC v2 0/10] sched,fair: flatten CPU controller runqueues Rik van Riel
2019-06-28 20:49 ` [PATCH 01/10] sched: introduce task_se_h_load helper Rik van Riel
2019-07-01 19:43 ` Josef Bacik
2019-06-28 20:49 ` [PATCH 02/10] sched: change /proc/sched_debug fields Rik van Riel
2019-07-01 19:52 ` Josef Bacik
2019-06-28 20:49 ` [PATCH 03/10] sched,fair: redefine runnable_load_avg as the sum of task_h_load Rik van Riel
2019-07-01 16:29 ` Josef Bacik
2019-07-01 16:47 ` Rik van Riel
2019-07-01 19:22 ` Josef Bacik
2019-07-01 19:32 ` Rik van Riel
2019-06-28 20:49 ` [PATCH 04/10] sched,fair: move runnable_load_avg to cfs_rq Rik van Riel
2019-06-28 20:49 ` [PATCH 05/10] sched,fair: remove cfs rqs from leaf_cfs_rq_list bottom up Rik van Riel
2019-07-04 9:33 ` Vincent Guittot
2019-07-05 1:02 ` Rik van Riel
2019-06-28 20:49 ` [PATCH 06/10] sched,cfs: use explicit cfs_rq of parent se helper Rik van Riel
2019-06-28 20:49 ` [PATCH 07/10] sched,cfs: fix zero length timeslice calculation Rik van Riel
2019-07-05 14:51 ` Vincent Guittot
2019-07-05 15:15 ` Rik van Riel
2019-06-28 20:49 ` [PATCH 08/10] sched,fair: refactor enqueue/dequeue_entity Rik van Riel
2019-06-28 20:49 ` [PATCH 09/10] sched,fair: add helper functions for flattened runqueue Rik van Riel
2019-07-01 20:20 ` Josef Bacik
2019-07-01 20:53 ` Rik van Riel [this message]
2019-06-28 20:49 ` [PATCH 10/10] sched,fair: flatten hierarchical runqueues Rik van Riel
2019-07-01 20:34 ` Josef Bacik
2019-07-01 20:58 ` Rik van Riel
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=402b70ecb4d362ab6975b00a715872d585a18e35.camel@surriel.com \
--to=riel@surriel.com \
--cc=dietmar.eggemann@arm.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--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
Powered by JetHome