Re: [Patch v3 3/6] sched/fair: Implement prefer sibling imbalance calculation between asymmetric groups

From: Tim Chen
Date: Fri Jul 14 2023 - 19:23:11 EST


On Fri, 2023-07-14 at 13:44 -0700, Tim Chen wrote:
> > >
> > > +static inline long sibling_imbalance(struct lb_env *env,
> > > + struct sd_lb_stats *sds,
> > > + struct sg_lb_stats *busiest,
> > > + struct sg_lb_stats *local)
> > > +{
> > > + int ncores_busiest, ncores_local;
> > > + long imbalance;
> >
> > can imbalance be unsigned int or unsigned long? as sum_nr_running is unsigned int.
>
> It could be made unsigned long.
>
>
Though in theory the imbalance can be both positive or negative. We are
considering only positive imbalance here as we only pull task to local group
and do not push task from local group.

Tim