lkml.org 
[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH 09/14] sched: Dynamically allocate sched_domain/sched_group data-structures
From
On Mon, Mar 14, 2011 at 8:06 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> @@ -1721,10 +1724,11 @@ select_task_rq_fair(struct rq *rq, struc
>        }
>
>        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.
Overall patchset looks great!

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

\
 
 \ /
  Last update: 2011-03-19 02:27    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site