Re: [PATCH v2 1/2] sched: Nominate idle load balancer from a semi-idle package.

Gautham R Shenoy
2009-04-03T15:12:24Z

Hi Andi,

Thanks for the review.
On Fri, Apr 03, 2009 at 09:04:42AM +0200, Andi Kleen wrote:
> Gautham R Shenoy <ego@in.ibm.com> writes:
> >
> > Improve the algorithm to nominate the idle load balancer from a semi idle
> > cores/packages thereby increasing the probability of the cores/packages being
> > in deeper sleep states for longer duration.
>
> The basic patch looks good.
>
> In theory you could also look for a nearby nohz balancer in the end
> to optimize traffic on the interconnect of a larger NUMA system,
> but it's probably not worth it.

The algorithm does this already, since it starts off with it's own
sched_group in the power-aware sched_domain, and moves to it's
sibling-groups. The sibling groups are linked in the order of
their proximity.
>
> >
> > The algorithm is activated only when sched_mc/smt_power_savings != 0.
>
> But it seems to me that this check could be dropped and doing it
> unconditionally, because idle balancing doesn't need much memory
> bandwith or cpu power, so always putting it nearby is good.

Well, right now, a new idle load balancer is nominated when the current
idle load balancer picks up a task. At this point, if the user is
concerned about performance as opposed to energy savings, we wouldn't
want to iterate over the domain hierarchy to find the best idle load
balancer, would we ? Because that might cause latency in running the job
that is queued on our runqueue.

Actually this can be optimized. We can have the current idle-load
balancer nominate the ilb as the first_cpu(nohz._cpu_mask). And this
idle load balancer at the end of the sched_tick can see if there's a
more power-efficient idle load balancer.

Let me see if this gives any benefit over the patches that I've posted.
>
> -Ani
>
> --
> ak@linux.intel.com -- Speaking for myself only.

--
Thanks and Regards
gautham