Re: [RFC][PATCH 09/14] sched: Dynamically allocatesched_domain/sched_group data-structures

From: Peter Zijlstra
Date: Fri Mar 25 2011 - 17:04:28 EST


On Fri, 2011-03-18 at 18:23 -0700, Venkatesh Pallipadi wrote:
> > if (affine_sd) {
> > - if (cpu == prev_cpu || wake_affine(affine_sd, p, sync))
> > - return select_idle_sibling(p, cpu);
> > - else
> > - return select_idle_sibling(p, prev_cpu);
> > + if (wake_affine(affine_sd, p, sync))
> > + prev_cpu = cpu;
> > +
> > + new_cpu = select_idle_sibling(p, prev_cpu);
> > + goto unlock;
> > }
> >
> > while (sd) {
>
> This would result in going through wake_affine() doing all
> effective_load stuff even with cpu == prev_cpu. No?
> So, we need either if (cpu != prev_cpu && wake_affine(affine_sd, p,
> sync)) or an check at the start to have want_affine=0 for this case.

D'0h yeah, I missed the conditional execution of wake_affine there, silly me.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/