From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: peterz@infradead.org, mingo@redhat.com,
linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com,
Valentin.Schneider@arm.com, Morten.Rasmussen@arm.com,
qperret@google.com
Subject: Re: [PATCH 3/3] sched/fair: Do not raise overutilized for idle CPUs
Date: Mon, 10 Jan 2022 16:40:27 +0000 [thread overview]
Message-ID: <Ydxhe7wkHsq5U6Gk@FVFF7649Q05P> (raw)
In-Reply-To: <CAKfTPtDjVdPimPbOes5Oix=3NYi3ZWY1dvQjZY3hoMfYbxXuDw@mail.gmail.com>
On Wed, Dec 22, 2021 at 09:20:17AM +0100, Vincent Guittot wrote:
> On Mon, 20 Dec 2021 at 12:43, Vincent Donnefort
> <vincent.donnefort@arm.com> wrote:
> >
> > During a migration, the lock for the previous runqueue is not taken and
> > hence, the task contribution isn't directly removed from that runqueue
> > utilization but instead temporarily saved, until the next PELT signals
> > update where it would be accounted. There is then a window in which a
> > CPU can ben idle be nonetheless overutilized.
> >
> > The load balancer wouldn't be able to do anything to help a sleeping CPU,
> > it brings then no gain to raise overutilized there, only the risk of
> > spuriously doing it.
>
> But how do you make the difference between a very short idle time of
> an overutilized CPU and a idle cpu with outdated utilization
No distinction here, but if the CPU is idle there's nothing to pull, so the load
balance wouldn't do anything with this information.
>
> Being idle is not a good reason for not being overutilized (ie ~80% of
> average utilisation)
>
> >
> > Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 51f6f55abb37..37f737c5f0b8 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -8641,26 +8641,28 @@ static inline void update_sg_lb_stats(struct lb_env *env,
> >
> > nr_running = rq->nr_running;
> > sgs->sum_nr_running += nr_running;
> > -
> > - if (nr_running > 1)
> > - *sg_status |= SG_OVERLOAD;
> > -
> > - if (cpu_overutilized(i))
> > - *sg_status |= SG_OVERUTILIZED;
> > -
> > #ifdef CONFIG_NUMA_BALANCING
> > sgs->nr_numa_running += rq->nr_numa_running;
> > sgs->nr_preferred_running += rq->nr_preferred_running;
> > #endif
> > + if (nr_running > 1)
> > + *sg_status |= SG_OVERLOAD;
>
> Why do you move this code related to overload ?
This was a cosmetic change to put the NUMA related stats next to the other ones.
[...]
next prev parent reply other threads:[~2022-01-10 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 11:43 [PATCH 0/3] Fix stuck overutilized Vincent Donnefort
2021-12-20 11:43 ` [PATCH 1/3] sched/fair: Make cpu_overutilized() EAS dependent Vincent Donnefort
2021-12-20 17:17 ` Valentin Schneider
2021-12-21 9:09 ` Vincent Donnefort
2021-12-20 11:43 ` [PATCH 2/3] sched/fair: Fix newidle_balance() for overutilized systems Vincent Donnefort
2021-12-20 17:17 ` Valentin Schneider
2021-12-22 8:14 ` Vincent Guittot
2022-01-10 16:29 ` Vincent Donnefort
2021-12-20 11:43 ` [PATCH 3/3] sched/fair: Do not raise overutilized for idle CPUs Vincent Donnefort
2021-12-20 17:17 ` Valentin Schneider
2021-12-22 8:20 ` Vincent Guittot
2022-01-10 16:40 ` Vincent Donnefort [this message]
2022-01-17 10:45 ` Vincent Guittot
2022-01-17 12:18 ` Vincent Donnefort
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=Ydxhe7wkHsq5U6Gk@FVFF7649Q05P \
--to=vincent.donnefort@arm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=Valentin.Schneider@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qperret@google.com \
--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).