From: Fernand Sieber <sieberf@amazon.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>, <mingo@redhat.com>,
<linux-kernel@vger.kernel.org>, <juri.lelli@redhat.com>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<kprateek.nayak@amd.com>, <dwmw@amazon.co.uk>,
<jschoenh@amazon.de>, <liuyuxua@amazon.com>, <abusse@amazon.com>,
<gmazz@amazon.com>, <rkagan@amazon.com>,
<nh-open-source@amazon.com>
Subject: Re: [PATCH] sched/fair: Force idle aware load balancing
Date: Mon, 1 Dec 2025 15:02:23 +0200 [thread overview]
Message-ID: <20251201130224.274217-1-sieberf@amazon.com> (raw)
In-Reply-To: <20251128135825.GC4067720@noisy.programming.kicks-ass.net>
On Fri, 28 Nov 2025 at 14:58, Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, Nov 28, 2025 at 02:55:36PM +0100, Vincent Guittot wrote:
> > On Thu, 27 Nov 2025 at 21:28, Fernand Sieber <sieberf@amazon.com> wrote:
>
> > > @@ -10135,15 +10136,15 @@ static inline int sg_imbalanced(struct sched_group *group)
> > > static inline bool
> > > group_has_capacity(unsigned int imbalance_pct, struct sg_lb_stats *sgs)
> > > {
> > > - if (sgs->sum_nr_running < sgs->group_weight)
> > > + if (sgs->sum_nr_running < (sgs->group_weight - sgs->forceidle_weight))
> > > return true;
> > >
> > > - if ((sgs->group_capacity * imbalance_pct) <
> > > - (sgs->group_runnable * 100))
> > > + if ((sgs->group_capacity * imbalance_pct * (sgs->group_weight - sgs->forceidle_weight)) <
> > > + (sgs->group_runnable * 100 * sgs->group_weight))
> >
> > so you apply a ratio on group capacity based on the number of forced
> > idle but what if you have heterogeneous systems ?
>
> Ah, good point. I suppose tracking force_idle_capacity in
> update_sg_lb_stats() should be possible, and then subtract that from
> group_capacity or so.
Thanks. Addressed in rev2, by keeping track of both forceidle_weight and
forceidle_capacity:
https://lore.kernel.org/lkml/20251201124223.247107-1-sieberf@amazon.com/
Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07
next prev parent reply other threads:[~2025-12-01 13:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 20:27 [PATCH] sched/fair: Force idle aware load balancing Fernand Sieber
2025-11-28 11:14 ` Peter Zijlstra
2025-11-28 13:50 ` Vincent Guittot
2025-12-01 12:58 ` Fernand Sieber
2025-11-28 13:55 ` Vincent Guittot
2025-11-28 13:58 ` Peter Zijlstra
2025-12-01 13:02 ` Fernand Sieber [this message]
2025-12-01 12:42 ` [PATCH v2] " Fernand Sieber
2026-02-26 15:47 ` Fernand Sieber
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=20251201130224.274217-1-sieberf@amazon.com \
--to=sieberf@amazon.com \
--cc=abusse@amazon.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dwmw@amazon.co.uk \
--cc=gmazz@amazon.com \
--cc=jschoenh@amazon.de \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyuxua@amazon.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=nh-open-source@amazon.com \
--cc=peterz@infradead.org \
--cc=rkagan@amazon.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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