lkml.org 
[lkml]   [2025]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/fair: Force idle aware load balancing
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.

\
 
 \ /
  Last update: 2025-11-28 14:59    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog